TextDyField.data_source('Size', 'data.instance_pool.size')
    ])

instance = ListDynamicLayout.set_layouts(
    'Compute Instance',
    layouts=[compute_instance, compute_instance_vcn, compute_instance_pool])

disk = TableDynamicLayout.set_fields(
    'Disk',
    root_path='disks',
    fields=[
        TextDyField.data_source('Index', 'device_index'),
        TextDyField.data_source('Name', 'device'),
        SizeField.data_source('Size(GB)',
                              'size',
                              options={
                                  'display_unit': 'GB',
                                  'source_unit': 'GB'
                              }),
        TextDyField.data_source('Volume ID', 'tags.volume_id'),
        TextDyField.data_source('Volume_type', 'disk_type'),
        TextDyField.data_source('VPUS per GB', 'tags.vpus_per_gb'),
        TextDyField.data_source('IOPS', 'tags.iops')
    ])

nic = TableDynamicLayout.set_fields(
    'NIC',
    root_path='nics',
    fields=[
        TextDyField.data_source('Index', 'device_index'),
        TextDyField.data_source('MAC Address', 'mac_address'),
        ListDyField.data_source('IP Addresses',
# TAB - Bucket
bucket_configuration_meta = ItemDynamicLayout.set_fields(
    'Configurations',
    fields=[
        TextDyField.data_source('Location Type',
                                'data.location.location_type'),
        TextDyField.data_source('Location', 'data.location.location_display'),
        EnumDyField.data_source('Default Storage Class',
                                'data.default_storage_class',
                                default_outline_badge=[
                                    'Standard', 'Nearline', 'Coldline',
                                    'Archive'
                                ]),
        TextDyField.data_source('Encryption Type', 'data.encryption'),
        TextDyField.data_source('Object Total Counts', 'data.object_count'),
        SizeField.data_source('Object Size', 'data.object_total_size'),
        EnumDyField.data_source('Public Access',
                                'data.public_access',
                                default_state={
                                    'safe':
                                    ['Subject to object ACLs', 'Not public'],
                                    'warning': ['Not authorized'],
                                    'alert': ['Public to internet'],
                                }),
        EnumDyField.data_source('Requester Pays',
                                'data.requester_pays',
                                default_badge={
                                    'indigo.500': ['OFF'],
                                    'coral.600': ['ON']
                                }),
        TextDyField.data_source('Access Control', 'data.access_control'),
    ])
vm_scale_set_info_scaling = ListDynamicLayout.set_layouts(
    'Scaling', layouts=[vm_scale_set_scaling_info, vm_scale_set_scaling_rules])

# TAB - Disks OS Disks and Data Disks
#  Image reference, Storage Type, Size, MAX iops, max throughput, encryption, host caching
#      : LUN, Storage Type, Size, MAx iops, max throughput, encryption, host caching
os_disk = ItemDynamicLayout.set_fields(
    'OS Disk',
    'data.virtual_machine_profile.storage_profile',
    fields=[
        TextDyField.data_source('Image Reference', 'image_reference_display'),
        TextDyField.data_source('Storage Account Type',
                                'os_disk.managed_disk.storage_account_type'),
        SizeField.data_source('Size',
                              'os_disk.disk_size_gb',
                              options={'source_unit': 'GB'}),
        TextDyField.data_source('Host Caching', 'os_disk.caching')
    ])
data_disks = SimpleTableDynamicLayout.set_fields(
    'Data Disks',
    'data.virtual_machine_profile.storage_profile.data_disks',
    fields=[
        TextDyField.data_source('Name', 'name'),
        TextDyField.data_source('Storage Type', 'managed_disk.storage_type'),
        SizeField.data_source('Size',
                              'disk_size_gb',
                              options={'source_unit': 'GB'}),
        TextDyField.data_source('Max IOPS', 'disk_iops_read_write'),
        TextDyField.data_source('MAX Throughput(MBps)',
                                'disk_m_bps_read_write'),
Beispiel #4
0
cpu_details_meta = ItemDynamicLayout.set_fields(
    'CPU',
    fields=[
        TextDyField.data_source('CPU Utilization (%) | Avg',
                                'data.monitoring.cpu.utilization.avg'),
        TextDyField.data_source('CPU Utilization (%) | Max',
                                'data.monitoring.cpu.utilization.max')
    ])

memory_details_meta = ItemDynamicLayout.set_fields(
    'Memory',
    fields=[
        TextDyField.data_source('Memory Usage (%) | Avg',
                                'data.monitoring.memory.usage.avg'),
        SizeField.data_source('Memory Total | Avg',
                              'data.monitoring.memory.total.avg'),
        SizeField.data_source('Memory Used  | Avg',
                              'data.monitoring.memory.used.avg'),
        TextDyField.data_source('Memory Usage (%) | Max',
                                'data.monitoring.memory.usage.max'),
        SizeField.data_source('Memory Total | Max',
                              'data.monitoring.memory.total.max'),
        SizeField.data_source('Memory Used  | Max',
                              'data.monitoring.memory.used.max'),
    ])

disk_details_meta = ItemDynamicLayout.set_fields(
    'Disk',
    fields=[
        TextDyField.data_source('Disk Read IOPS | Avg',
                                'data.monitoring.disk.read_iops.avg'),
Beispiel #5
0
cst_snapshot.group = 'Compute'
cst_snapshot.service_code = 'Microsoft.Compute/snapshots'
cst_snapshot.labels = ['Compute', 'Storage']
cst_snapshot.is_primary = False
cst_snapshot.is_major = False
cst_snapshot.tags = {
    'spaceone:icon':
    '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',
cst_disk.labels = ['Compute', 'Storage']
cst_disk.is_major = True
cst_disk.tags = {
    'spaceone:icon': 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/Compute_Engine.svg',
    'spaceone:display_name': 'Disk'
}

cst_disk._metadata = CloudServiceTypeMeta.set_meta(
    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'),
    'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/Compute_Engine.svg',
}

cst_snapshot._metadata = CloudServiceTypeMeta.set_meta(
    fields=[
        TextDyField.data_source('Name', 'data.name'),
        EnumDyField.data_source('Status',
                                'data.status',
                                default_state={
                                    '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'),
Beispiel #8
0
                                'data.fault_domains',
                                options={'delimiter': '<br>'}),
        TextDyField.data_source('Cluster Name', 'data.cluster_name'),
        TextDyField.data_source('OCID', 'data.id'),
        TextDyField.data_source('Shape', 'data.shape'),
        TextDyField.data_source('Version', 'data.version'),
        DateTimeDyField.data_source('Created', 'data.time_created'),
        TextDyField.data_source('Time Zone', 'data.time_zone'),
        TextDyField.data_source('Compartment', 'data.compartment_name'),
        TextDyField.data_source('Oracle Database Software Edition',
                                'data.database_edition'),
        TextDyField.data_source('Storage Management Software',
                                'data.db_system_options.storage_management'),
        SizeField.data_source('Storage Size',
                              'data.data_storage_size_in_gbs',
                              options={
                                  'display_unit': 'GB',
                                  'source_unit': 'GB'
                              }),
        TextDyField.data_source('Licence Type', 'data.license_model'),
        TextDyField.data_source('Maintenance Window',
                                'data.maintenance_window.display'),
        TextDyField.data_source('KMS key Id', 'data.kms_key_id'),
        ListDyField.data_source('SSH Public Key',
                                'data.ssh_public_keys',
                                options={'delimiter': '<br>'})
    ])

dbsystem_network = ItemDynamicLayout.set_fields(
    'Network',
    fields=[
        TextDyField.data_source('Subnet Id', 'data.subnet_id'),
            default_state={
                'safe': ['AVAILABLE'],
                'warning':
                ['UPDATING', 'TERMINATING', 'MAINTENANCE_IN_PROGRESS'],
                'alert': ['TERMINATED', 'FAILED']
            }),
        TextDyField.data_source('Availability Domain',
                                'data.availability_domain'),
        TextDyField.data_source('Compartment', 'data.compartment_name'),
        TextDyField.data_source('Shape', 'data.shape'),
        TextDyField.data_source('Version', 'data.version'),
        TextDyField.data_source('Compute Count', 'data.compute_count'),
        TextDyField.data_source('Storage Count', 'data.storage_count'),
        SizeField.data_source('Total Storage Size',
                              'data.total_storage_size_in_gbs',
                              options={
                                  'display_unit': 'GB',
                                  'source_unit': 'GB'
                              }),
        SizeField.data_source('Available Storage Size',
                              'data.available_storage_size_in_gbs',
                              options={
                                  'display_unit': 'GB',
                                  'source_unit': 'GB'
                              }),
        #TextDyField.data_source('Maintenance Window' 'data.maintenance_window.display'),
        DateTimeDyField.data_source('Created', 'data.time_created')
    ])

exadata_last_maintenance_run = ItemDynamicLayout.set_fields(
    'Last Maintenance Run',
    root_path='data.last_maintenance_run',