'indigo.500': ['On'],
                                    'coral.600': ['Off']
                                }),
        TextDyField.data_source('Network', 'data.display.network_display'),
        TextDyField.data_source('Direction', 'data.display.direction_display'),
        TextDyField.data_source('Priority', 'data.priority'),
        EnumDyField.data_source('Action On Match',
                                'data.display.action',
                                default_badge={
                                    'indigo.500': ['Allow'],
                                    'coral.600': ['Deny']
                                }),
        DateTimeDyField.data_source('Creation Time',
                                    'data.creation_timestamp'),
    ],
    search=[
        SearchField.set(name='ID', key='data.id'),
        SearchField.set(name='Name', key='data.name'),
        SearchField.set(name='Priority', key='data.priority'),
        SearchField.set(name='Direction',
                        key='data.display.direction_display'),
        SearchField.set(name='Action', key='data.display.action'),
        SearchField.set(name='Creation Time',
                        key='data.creation_timestamp',
                        data_type='datetime'),
    ])

CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_firewall}),
]
Exemple #2
0
        TextDyField.data_source(
            'Default Partition Expires',
            'data.default_partition_expiration_ms_display'),
        TextDyField.data_source('Default Table Expires',
                                'data.default_table_expiration_ms_display'),
        EnumDyField.data_source('Visible on Console',
                                'data.visible_on_console',
                                default_badge={
                                    'indigo.500': ['true'],
                                    'coral.600': ['false']
                                }),
        DateTimeDyField.data_source('Creation Time', 'data.creation_time'),
        DateTimeDyField.data_source('Last Modified Time',
                                    'data.last_modified_time'),
    ],
    search=[
        SearchField.set(name='ID', key='data.id'),
        SearchField.set(name='Name', key='data.name'),
        SearchField.set(name='Location', key='data.location'),
        SearchField.set(name='Creation Time',
                        key='data.creation_time',
                        data_type='datetime'),
        SearchField.set(name='Last Modified Time',
                        key='data.last_modified_time',
                        data_type='datetime'),
    ])

CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_sql_workspace}),
]
Exemple #3
0
        TextDyField.data_source('Number of Subnet',
                                'data.subnetwork_data.total_number'),
        TextDyField.data_source('Maximum transmission unit', 'data.mtu'),
        TextDyField.data_source('Mode', 'data.subnet_creation_mode'),
        EnumDyField.data_source('Global Dynamic Routing',
                                'data.global_dynamic_route',
                                default_state={
                                    'safe': ['On'],
                                    'warning': ['Off'],
                                }),
        TextDyField.data_source('Firewall Rules',
                                'data.firewall_data.total_number'),
        DateTimeDyField.data_source('Creation Time',
                                    'data.creation_timestamp'),
    ],
    search=[
        SearchField.set(name='ID', key='data.id'),
        SearchField.set(name='Name', key='data.name'),
        SearchField.set(name='description', key='data.description'),
        SearchField.set(name='firewall', key='data.firewall_data.firewall'),
        SearchField.set(name='route', key='data.route_data.route'),
        SearchField.set(name='subnetwork', key='data.subnetwork_data.subnets'),
        SearchField.set(name='Creation Time',
                        key='data.creation_timestamp',
                        data_type='datetime'),
    ])

CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_network}),
]
cst_virtual_network.is_major = True
cst_virtual_network.is_primary = True
cst_virtual_network.tags = {
    'spaceone:icon':
    'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/azure/azure-virtual-networks.svg',
}

cst_virtual_network._metadata = CloudServiceTypeMeta.set_meta(
    fields=[
        TextDyField.data_source('Name', 'data.name'),
        TextDyField.data_source('Resource Group', 'data.resource_group'),
        TextDyField.data_source('Location', 'data.location'),
        TextDyField.data_source('Subscription', 'data.subscription_name')
    ],
    search=[
        SearchField.set(name='ID', key='data.id', data_type='string'),
        SearchField.set(name='Name', key='data.name', data_type='string'),
        SearchField.set(name='Subscription ID',
                        key='data.subscription_id',
                        data_type='string'),
        SearchField.set(name='Subscription Name',
                        key='data.subscription_name',
                        data_type='string'),
        SearchField.set(name='Resource Group',
                        key='data.resource_group',
                        data_type='string'),
        SearchField.set(name='Location',
                        key='data.location',
                        data_type='string'),
    ])
cst_phd._metadata = CloudServiceTypeMeta.set_meta(
    fields=[
        TextDyField.data_source('Event', 'data.event_title'),
        EnumDyField.data_source('Status', 'data.status_code', default_state={
            'safe': ['closed'],
            'warning': ['upcoming'],
            'alert': ['open']
        }),
        TextDyField.data_source('Event Category', 'data.event_type_category'),
        TextDyField.data_source('Region', 'region_code'),
        TextDyField.data_source('Affected Resources', 'data.affected_resource_display'),
        DateTimeDyField.data_source('Start Time', 'data.start_time'),
        DateTimeDyField.data_source('Last Update Time', 'data.last_update_time'),
    ],
    search=[
        SearchField.set(name='ARN', key='data.arn'),
        SearchField.set(name='Event', key='data.event_type_code'),
        SearchField.set(name='Event Category', key='data.event_type_category'),
        SearchField.set(name='Event Scope Code', key='data.event_scope_code'),
        SearchField.set(name='Status Code', key='data.status_code'),
        SearchField.set(name='Service', key='data.service'),
        SearchField.set(name='Start Time', key='data.start_time', data_type='datetime'),
        SearchField.set(name='Last Update Time', key='data.last_update_time', data_type='datetime'),
        SearchField.set(name='End Time', key='data.end_type', data_type='datetime'),
        SearchField.set(name='Affected Resource', key='data.affected_resources.entity_value')
    ]
)

CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_phd}),
]
Exemple #6
0
                                'data.is_ephemeral',
                                default_badge={
                                    'indigo.500': ['Static'],
                                    'coral.600': ['Ephemeral']
                                }),
        EnumDyField.data_source('Version',
                                'data.ip_version_display',
                                default_badge={
                                    'indigo.500': ['IPv4'],
                                    'coral.600': ['IPv6']
                                }),
        ListDyField.data_source('In Used By', 'data.used_by'),
        TextDyField.data_source('Network Tier', 'data.network_tier_display'),
        DateTimeDyField.data_source('Creation Time',
                                    'data.creation_timestamp'),
    ],
    search=[
        SearchField.set(name='ID', key='data.id'),
        SearchField.set(name='Name', key='data.name'),
        SearchField.set(name='IP Address', key='data.address'),
        SearchField.set(name='Version', key='data.ip_version_display'),
        SearchField.set(name='Network Tier', key='data.network_tier_display'),
        SearchField.set(name='Creation Time',
                        key='data.creation_timestamp',
                        data_type='datetime'),
    ])

CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_external_ip}),
]
Exemple #7
0
cst_instance_template._metadata = CloudServiceTypeMeta.set_meta(
    fields=[
        TextDyField.data_source('Name', 'data.name'),
        TextDyField.data_source('Machine Type',
                                'data.machine.machine_display'),
        TextDyField.data_source('Image', 'data.image'),
        TextDyField.data_source('Disk Type', 'data.disk_display'),
        ListDyField.data_source('In Used By',
                                'data.in_used_by',
                                default_badge={
                                    'type': 'outline',
                                    'delimiter': '<br>'
                                }),
        DateTimeDyField.data_source('Creation Time',
                                    'data.creation_timestamp'),
    ],
    search=[
        SearchField.set(name='Name', key='data.name'),
        SearchField.set(name='Machine Type', key='data.machine.machine_type'),
        SearchField.set(name='Image', key='data.image'),
        SearchField.set(name='Disk Type', key='data.disk_display'),
        SearchField.set(name='In Use By', key='data.in_used_by'),
        SearchField.set(name='Creation Time',
                        key='data.creation_timestamp',
                        data_type='datetime'),
    ])

CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_instance_template}),
]
Exemple #8
0
                                    'safe': ['RUNNING'],
                                    'disable': ['UNKNOWN', 'ON-DEMAND'],
                                    'alert': ['STOPPED'],
                                }),
        TextDyField.data_source('Type', 'data.database_version'),
        TextDyField.data_source('Project', 'data.project'),
        ListDyField.data_source('Public IP Address',
                                'data.ip_addresses',
                                default_badge={
                                    'type': 'outline',
                                    'sub_key': 'ip_address',
                                    'delimiter': '<br>'
                                }),
        TextDyField.data_source('Location', 'data.gce_zone'),
        TextDyField.data_source('Data Disk Size (GB)',
                                'data.settings.data_disk_size_gb'),
    ],
    search=[
        SearchField.set(name='Name', key='data.name'),
        SearchField.set(name='State', key='data.state'),
        SearchField.set(name='Type', key='data.database_version'),
        SearchField.set(name='Project', key='data.project'),
        SearchField.set(name='Region', key='data.region'),
        SearchField.set(name='Zone', key='data.gce_zone'),
        SearchField.set(name='Public IP Address',
                        key='data.ip_addresses.ip_address'),
    ])

CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_instance}),
]
cst_price = CloudServiceTypeResource()
cst_price.name = 'Product'
cst_price.provider = 'aws'
cst_price.group = 'Pricing'
cst_price.labels = ['Management']
cst_price.tags = {}

cst_price._metadata = CloudServiceTypeMeta.set_meta(
    fields=[
        TextDyField.data_source('Service Code', 'data.service_code'),
        TextDyField.data_source('Product Family', 'data.product_family'),
        TextDyField.data_source('Region', 'data.region_name'),
        TextDyField.data_source('SKU', 'data.sku'),
    ],
    search=[
        SearchField.set(name='Service Code', key='data.service_code'),
        SearchField.set(name='Region', key='data.region_name'),
        SearchField.set(name='Product Family', key='data.product_family'),
        SearchField.set(name='SKU', key='data.sku'),
        SearchField.set(name='Physical Processor',
                        key='data.attributes.physicalProcessor'),
        SearchField.set(name='Processor Features',
                        key='data.attributes.processorFeatures'),
        SearchField.set(name='Instance Type',
                        key='data.attributes.instanceType'),
        SearchField.set(name='Instance Family',
                        key='data.attributes.instanceFamily'),
        SearchField.set(name='Operating System',
                        key='data.attributes.operatingSystem'),
        SearchField.set(name='vcpu',
                        key='data.attributes.vcpu',
Exemple #10
0
cst_instance_group._metadata = CloudServiceTypeMeta.set_meta(
    fields=[
        TextDyField.data_source('Name', 'data.name'),
        TextDyField.data_source('Instances', 'data.instance_counts'),
        EnumDyField.data_source(
            'Type',
            'data.instance_group_type',
            default_outline_badge=['STATELESS', 'STATEFUL', 'UNMANAGED']),
        TextDyField.data_source('Template', 'data.template.name'),
        TextDyField.data_source('Autoscaling', 'data.autoscaling_display'),
        DateTimeDyField.data_source('Creation Time',
                                    'data.creation_timestamp'),
    ],
    search=[
        SearchField.set(name='Name', key='data.name'),
        SearchField.set(name='Instance Counts',
                        key='data.name',
                        data_type='integer'),
        SearchField.set(name='Template', key='data.template.name'),
        SearchField.set(name='Region', key='region_code'),
        SearchField.set(name='Zone', key='data.zone'),
        SearchField.set(name='Creation Time',
                        key='data.creation_timestamp',
                        data_type='datetime'),
    ])

CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_instance_group}),
]
Exemple #11
0
     TextDyField.data_source('Lifecycle rules',
                             'data.lifecycle_rule.lifecycle_rule_display'),
     EnumDyField.data_source('Requester Pays',
                             'data.requester_pays',
                             default_badge={
                                 'indigo.500': ['OFF'],
                                 'coral.600': ['ON']
                             }),
     TextDyField.data_source('Retention Policy',
                             'data.retention_policy_display'),
     TextDyField.data_source('Encryption', 'data.encryption'),
     DateTimeDyField.data_source('Creation Time',
                                 'data.creation_timestamp'),
 ],
 search=[
     SearchField.set(name='ID', key='data.id'),
     SearchField.set(name='Name', key='data.name'),
     SearchField.set(name='Location', key='data.location.location'),
     SearchField.set(name='Object Counts',
                     key='data.object_count',
                     data_type='integer'),
     SearchField.set(name='Object Total Size (Bytes)',
                     key='data.object_total_size',
                     data_type='integer'),
     SearchField.set(name='Creation Time',
                     key='data.creation_timestamp',
                     data_type='datetime'),
     SearchField.set(name='Update Time',
                     key='data.update_timestamp',
                     data_type='datetime'),
 ])
Exemple #12
0
    'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/azure/azure-application-gateways.svg',
}

cst_application_gateway._metadata = CloudServiceTypeMeta.set_meta(
    fields=[
        TextDyField.data_source('Name', 'data.name'),
        TextDyField.data_source('Public IP Address',
                                'data.public_ip_address.ip_address'),
        TextDyField.data_source('Private IP Address',
                                'data.private_ip_address'),
        TextDyField.data_source('Resource Group', 'data.resource_group'),
        TextDyField.data_source('Location', 'data.location'),
        TextDyField.data_source('Subscription', 'data.subscription_name')
    ],
    search=[
        SearchField.set(name='ID', key='data.id', data_type='string'),
        SearchField.set(name='Name', key='data.name', data_type='string'),
        SearchField.set(name='Subscription ID',
                        key='data.subscription_id',
                        data_type='string'),
        SearchField.set(name='Subscription Name',
                        key='data.subscription_name',
                        data_type='string'),
        SearchField.set(name='Resource Group',
                        key='data.resource_group',
                        data_type='string'),
        SearchField.set(name='Location',
                        key='data.location',
                        data_type='string'),
        SearchField.set(name='Public IP Address',
                        key='data.public_ip_address.ip_address',
     SizeField.data_source('Size', 'data.size'),
     EnumDyField.data_source(
         'Disk State',
         'data.disk_state',
         default_state={
             'safe': ['ActiveSAS', 'ActiveUpload', 'Attached', 'Reserved'],
             'warning': ['ReadyToUpload'],
             'available': ['Unattached']
         }),
     TextDyField.data_source('Owner', 'data.managed_by'),
     TextDyField.data_source('Resource Group', 'data.resource_group'),
     TextDyField.data_source('Location', 'data.location'),
     TextDyField.data_source('Subscription', 'data.subscription_name'),
 ],
 search=[
     SearchField.set(name='ID', key='data.id', data_type='string'),
     SearchField.set(name='Name', key='data.name', data_type='string'),
     SearchField.set(name='Tier', key='data.tier', data_type='string'),
     SearchField.set(name='Subscription ID',
                     key='data.subscription_id',
                     data_type='string'),
     SearchField.set(name='Subscription Name',
                     key='data.subscription_name',
                     data_type='string'),
     SearchField.set(name='Resource Group',
                     key='data.resource_group',
                     data_type='string'),
     SearchField.set(name='Location',
                     key='data.location',
                     data_type='string'),
     SearchField.set(name='Zone', key='data.zones', data_type='string'),
            'warning': ['AutoClosed', 'Inaccessible', 'Offline', 'OfflineChangingDwPerformanceTiers',
                        'OfflineSecondary',
                        'Pausing', 'Recovering', 'RecoveryPending', 'Suspect'],
            'disable': ['Disabled', 'Paused', 'Shutdown'],
            'alert': ['EmergencyMode']
        }),
        TextDyField.data_source('Replication Partner Server', 'data.replication_link.partner_server'),
        TextDyField.data_source('Server', 'data.server_name'),
        TextDyField.data_source('Pricing Tier', 'data.pricing_tier_display'),
        TextDyField.data_source('Location', 'data.location'),
        TextDyField.data_source('Subscription ID', 'data.subscription_id'),
        TextDyField.data_source('Resource Group', 'data.resource_group'),

    ],
    search=[
        SearchField.set(name='Database ID', key='data.database_id', data_type='string'),
        SearchField.set(name='Name', key='data.name', data_type='string'),
        SearchField.set(name='Subscription ID', key='data.subscription_id', data_type='string'),
        SearchField.set(name='Resource Group', key='data.resource_group', data_type='string'),
        SearchField.set(name='Location', key='data.location', data_type='string'),
        SearchField.set(name='Tier', key='data.sku.tier', data_type='string'),
        SearchField.set(name='Server Name', key='data.managed_by', data_type='string')

    ]

)


CLOUD_SERVICE_TYPES_SQL_DB = [
    CloudServiceTypeResponse({'resource': cst_sql_database}),
]
                                    'safe': ['READY'],
                                    'warning':
                                    ['CREATING', 'UPLOADING', 'DELETING'],
                                    'alert': ['FAILED'],
                                }),
        ListDyField.data_source('Location', 'data.storage_locations'),
        SizeField.data_source('SnapShot Size', 'data.disk.storage_bytes'),
        TextDyField.data_source('Creation Type', 'data.creation_type'),
        TextDyField.data_source('Source Disk',
                                'data.disk.source_disk_display'),
        SizeField.data_source('Disk Size', 'data.disk.disk_size'),
        DateTimeDyField.data_source('Creation Time',
                                    'data.creation_timestamp'),
    ],
    # TODO: Give a set that fit to its filtered data...
    search=[
        SearchField.set(name='ID', key='data.id'),
        SearchField.set(name='Name', key='data.name'),
        SearchField.set(name='Location', key='data.storage_locations'),
        SearchField.set(name='Source Disk',
                        key='data.disk.source_disk_display'),
        SearchField.set(name='Creation Type', key='data.creation_type'),
        SearchField.set(name='Creation Time',
                        key='data.creation_timestamp',
                        data_type='datetime'),
    ])

CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_snapshot}),
]
cst_load_balancing._metadata = CloudServiceTypeMeta.set_meta(
    fields=[
        TextDyField.data_source('Name', 'data.name'),
        EnumDyField.data_source('Protocol',
                                'data.lead_protocol',
                                default_badge={
                                    'primary': ['HTTP', 'HTTPS', 'HTTP(S)'],
                                    'indigo.500': ['TCP', 'TCP (Proxy)'],
                                    'coral.600': ['UDP', 'UDP (Proxy)']
                                }),
        TextDyField.data_source('Region', 'data.region'),
        TextDyField.data_source('Frontends', 'data.frontend_display'),
        TextDyField.data_source('Backends', 'data.backends_display'),
        DateTimeDyField.data_source('Creation Time',
                                    'data.creation_timestamp'),
    ],
    search=[
        SearchField.set(name='ID', key='data.id'),
        SearchField.set(name='Name', key='data.name'),
        SearchField.set(name='Protocol', key='data.lead_protocol'),
        SearchField.set(name='Region', key='data.region'),
        SearchField.set(name='description', key='data.description'),
        SearchField.set(name='Creation Time',
                        key='data.creation_timestamp',
                        data_type='datetime'),
    ])

CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_load_balancing}),
]
    fields=[
        TextDyField.data_source('Name', 'data.name'),
        TextDyField.data_source('ID', 'data.id'),
        TextDyField.data_source('Zone', 'data.zone'),
        TextDyField.data_source('Source Image', 'data.source_image_display'),
        EnumDyField.data_source('Disk Type', 'data.disk_type',
                                default_outline_badge=['local-ssd', 'pd-balanced', 'pd-ssd', 'pd-standard']),
        SizeField.data_source('Size', 'data.size'),
        ListDyField.data_source('In Used By', 'data.in_used_by',
                                default_badge={'type': 'outline', 'delimiter': '<br>'}),
        ListDyField.data_source('Snapshot Schedule', 'data.snapshot_schedule_display',
                                default_badge={'type': 'outline', 'delimiter': '<br>'}),
        DateTimeDyField.data_source('Creation Time', 'data.creation_timestamp'),
    ],
    search=[
        SearchField.set(name='ID', key='data.id'),
        SearchField.set(name='Name', key='data.name'),
        SearchField.set(name='Status', key='data.status'),
        SearchField.set(name='Disk Type', key='data.disk_type'),
        SearchField.set(name='Size (Bytes)', key='data.size', data_type='integer'),
        SearchField.set(name='Project', key='data.project'),
        SearchField.set(name='Zone', key='data.zone'),
        SearchField.set(name='Region', key='region_code'),
        SearchField.set(name='Creation Time', key='data.creation_timestamp', data_type='datetime'),
    ]
)

CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_disk}),
]
cst_adb.group = 'AutonomousDatabase'
cst_adb.labels = ['database']
cst_adb.service_code = ''
cst_adb.is_primary = True
cst_adb.is_major = True
cst_adb.tags = {
    'spaceone:icon': ''
}

cst_adb._metadata = CloudServiceTypeMeta.set_meta(
    fields=[
        TextDyField.data_source('Display Name', ''),
        TextDyField.data_source('State', ''),
        TextDyField.data_source('Dedicated', ''),
        TextDyField.data_source('OCPUs', ''),
        TextDyField.data_source('Storage (TB)', ''),
        TextDyField.data_source('Workload Type', ''),
        TextDyField.data_source('Autonomous Data Guard', ''),
        DateTimeDyField.data_source('Created', ''),
    ],
    search=[
        SearchField.set(name='ID', key='data.id'),
    ]

)


CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_adb})
]
Exemple #19
0
    'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/azure/azure-disk-snapshot.svg',
}

cst_snapshot._metadata = CloudServiceTypeMeta.set_meta(
    fields=[
        TextDyField.data_source('Name', 'data.name'),
        TextDyField.data_source('Source disk', 'data.source_disk_name'),
        TextDyField.data_source('Snapshot type', 'data.incremental_display'),
        SizeField.data_source('Source disk size', 'data.disk_size_bytes'),
        TextDyField.data_source('Resource Group', 'data.resource_group'),
        TextDyField.data_source('Location', 'data.location'),
        TextDyField.data_source('Subscription', 'data.subscription_name'),
        DateTimeDyField.data_source('Time created', 'data.time_created')
    ],
    search=[
        SearchField.set(name='ID', key='data.id', data_type='string'),
        SearchField.set(name='Name', key='data.name', data_type='string'),
        SearchField.set(name='Subscription ID',
                        key='data.subscription_id',
                        data_type='string'),
        SearchField.set(name='Subscription Name',
                        key='data.subscription_name',
                        data_type='string'),
        SearchField.set(name='Resource Group',
                        key='data.resource_group',
                        data_type='string'),
        SearchField.set(name='Location',
                        key='data.location',
                        data_type='string'),
        SearchField.set(name='Storage Account Type',
                        key='data.sku.name',
Exemple #20
0
cst_ta.is_primary = True
cst_ta.tags = {
    'spaceone:icon':
    'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/aws/AWS-Trusted-Advisor.svg',
}

cst_ta._metadata = CloudServiceTypeMeta.set_meta(
    fields=[
        TextDyField.data_source('Category', 'data.category'),
        TextDyField.data_source('Name', 'data.name'),
        EnumDyField.data_source('Status',
                                'data.status',
                                default_state={
                                    'safe': ['ok'],
                                    'warning': ['warning'],
                                    'alert': ['error'],
                                    'disable': ['not_available']
                                }),
        TextDyField.data_source('Check ID', 'data.check_id'),
    ],
    search=[
        SearchField.set(name='Check ID', key='data.check_id'),
        SearchField.set(name='Category', key='data.category'),
        SearchField.set(name='Status', key='data.status'),
        SearchField.set(name='AWS Account ID', key='data.account_id'),
    ])

CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_ta}),
]
Exemple #21
0
cst_machine_image._metadata = CloudServiceTypeMeta.set_meta(
    fields=[
        TextDyField.data_source('Name', 'data.name'),
        TextDyField.data_source('Source Instance',
                                'data.machine.machine_display'),
        TextDyField.data_source('Machine Type', 'data.machine.machine_type'),
        ListDyField.data_source('Storage location',
                                'data.storage_locations',
                                default_badge={
                                    'type': 'outline',
                                    'delimiter': '<br>'
                                }),
        DateTimeDyField.data_source('Creation Time',
                                    'data.creation_timestamp'),
    ],
    search=[
        SearchField.set(name='ID', key='data.id'),
        SearchField.set(name='Name', key='data.name'),
        SearchField.set(name='Machine Type', key='data.machine.machine_type'),
        SearchField.set(name='Disk Type', key='data.disks.tags.disk_type'),
        SearchField.set(name='Core', key='data.machine.core'),
        SearchField.set(name='Memory', key='data.machine.memory'),
        SearchField.set(name='Creation Time',
                        key='data.creation_timestamp',
                        data_type='datetime'),
    ])

CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_machine_image}),
]
Exemple #22
0
        EnumDyField.data_source('Dedicated',
                                'data.is_dedicated',
                                default_badge={
                                    'indigo.500': ['true'],
                                    'coral.600': ['false'],
                                }),
        TextDyField.data_source('OCPUs', 'data.cpu_core_count'),
        SizeField.data_source('Storage', 'data.size'),
        TextDyField.data_source('Workload Type', 'data.db_workload_display'),
        EnumDyField.data_source('Autonomous Data Guard',
                                'data.is_data_guard_enable',
                                default_badge={
                                    'indigo.500': ['true'],
                                    'coral.600': ['false']
                                }),
        DateTimeDyField.data_source('Created', 'data.time_created'),
    ],
    search=[
        SearchField.set(name='ID', key='data.id'),
        SearchField.set(name='Display Name', key='data.display_name'),
        SearchField.set(name='Compartment', key='data.compartment_name'),
        SearchField.set(name='Region', key='data.region'),
        SearchField.set(name='State', key='data.lifecycle_state'),
        SearchField.set(name='Workload Type', key='data.db_workload_display'),
        SearchField.set(name='Creation time',
                        key='data.time_created',
                        data_type='datetime')
    ])

CLOUD_SERVICE_TYPES = [CloudServiceTypeResponse({'resource': cst_adb})]
Exemple #23
0
         'data.auto_scaler.autoscaling_policy.max_num_replicas'),
     TextDyField.data_source('Recommended Size',
                             'data.auto_scaler.recommended_size'),
     TextDyField.data_source('Template', 'data.template.name'),
     EnumDyField.data_source('Autoscaling Mode',
                             'data.auto_scaler.autoscaling_policy.mode',
                             default_badge={
                                 'indigo.500': ['ON'],
                                 'coral.600': ['OFF']
                             }),
     TextDyField.data_source('Autoscaling', 'data.autoscaling_display'),
     DateTimeDyField.data_source('Creation Time',
                                 'data.creation_timestamp'),
 ],
 search=[
     SearchField.set(name='Name', key='data.name'),
     SearchField.set(name='Instance Counts',
                     key='data.name',
                     data_type='integer'),
     SearchField.set(
         name='Minimum Number of Replicas',
         key='data.auto_scaler.autoscaling_policy.min_num_replicas',
         data_type='integer'),
     SearchField.set(
         name='Maximum Number of Replicas',
         key='data.auto_scaler.autoscaling_policy.max_num_replicas',
         data_type='integer'),
     SearchField.set(name='Recommended Size',
                     key='data.auto_scaler.recommended_size',
                     data_type='integer'),
     SearchField.set(name='Template', key='data.template.name'),
Exemple #24
0
            }),
        TextDyField.data_source('Availability Domain',
                                'data.availability_domain'),
        TextDyField.data_source('Shape', 'data.shape'),
        TextDyField.data_source('CPU Core Count', 'data.cpu_core_count'),
        SizeField.data_source('Storage Size',
                              'data.data_storage_size_in_gbs',
                              options={
                                  'display_unit': 'GB',
                                  'source_unit': 'GB'
                              }),
        TextDyField.data_source('Edition', 'data.database_edition'),
        DateTimeDyField.data_source('Created', 'data.time_created'),
    ],
    search=[
        SearchField.set(name='Display Name', key='data.display_name'),
        SearchField.set(name='State', key='data.lifecycle_state'),
        SearchField.set(name='Availability Domain',
                        key='data.availability_domain'),
        SearchField.set(name='Shape', key='data.shape'),
        SearchField.set(name='CPU Core Count', key='data.cpu_core_count'),
        SearchField.set(name='Edition', key='data.database_edition'),
        SearchField.set(name='Storage Size',
                        key='data.data_storage_size_in_gbs'),
        SearchField.set(name='Created',
                        key='data.time_created',
                        data_type='datetime'),
    ])
'''
Database
'''
Exemple #25
0
cst_sql_server._metadata = CloudServiceTypeMeta.set_meta(
    fields=[
        TextDyField.data_source('Name', 'data.name'),
        EnumDyField.data_source('Status',
                                'data.state',
                                default_state={
                                    'safe': ['Ready'],
                                    'warning': ['Disabled']
                                }),
        TextDyField.data_source('Resource Group', 'data.resource_group'),
        TextDyField.data_source('Location', 'data.location'),
        TextDyField.data_source('Subscription', 'data.subscription_name'),
    ],
    search=[
        SearchField.set(name='ID', key='data.id', data_type='string'),
        SearchField.set(name='Name', key='data.name', data_type='string'),
        SearchField.set(name='Subscription ID',
                        key='data.subscription_id',
                        data_type='string'),
        SearchField.set(name='Subscription Name',
                        key='data.subscription_name',
                        data_type='string'),
        SearchField.set(name='Resource Group',
                        key='data.resource_group',
                        data_type='string'),
        SearchField.set(name='Location',
                        key='data.location',
                        data_type='string'),
        SearchField.set(name='Public Network Access',
                        key='data.public_network_access',
Exemple #26
0
cst_route.tags = {
    'spaceone:icon': 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/Route.svg',
}


cst_route._metadata = CloudServiceTypeMeta.set_meta(
    fields=[
        TextDyField.data_source('Name', 'data.name'),
        TextDyField.data_source('Description', 'data.description'),
        TextDyField.data_source('Destination IP Range', 'data.dest_range'),
        TextDyField.data_source('Priority', 'data.priority'),
        ListDyField.data_source('Instance tags', 'data.display.instance_tags_on_list'),
        TextDyField.data_source('Network', 'data.display.network_display'),
        TextDyField.data_source('Next Hop', 'data.display.next_hop'),
        DateTimeDyField.data_source('Creation Time', 'data.creation_timestamp'),
    ],

    search=[
        SearchField.set(name='ID', key='data.id'),
        SearchField.set(name='Name', key='data.name'),
        SearchField.set(name='Priority', key='data.priority'),
        SearchField.set(name='Instance Tags', key='data.tags'),
        SearchField.set(name='Network', key='data.display.network_display'),
        SearchField.set(name='Creation Time', key='data.creation_timestamp', data_type='datetime'),
    ]
)

CLOUD_SERVICE_TYPES = [
    CloudServiceTypeResponse({'resource': cst_route}),
]