abh1sar commented on code in PR #9208: URL: https://github.com/apache/cloudstack/pull/9208#discussion_r1742386973
########## engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql: ########## @@ -158,6 +158,298 @@ WHERE name IN ("quota.usage.smtp.useStartTLS", "quota.usage.smtp.useAuth", "alert.smtp.useAuth", "project.smtp.useAuth") AND value NOT IN ("true", "y", "t", "1", "on", "yes"); +CREATE TABLE `cloud`.`shared_filesystem`( + `id` bigint unsigned NOT NULL auto_increment COMMENT 'ID', + `uuid` varchar(40) COMMENT 'UUID', + `name` varchar(255) NOT NULL COMMENT 'Name of the shared filesystem', + `description` varchar(1024) COMMENT 'Description', + `domain_id` bigint unsigned NOT NULL COMMENT 'Domain ID', + `account_id` bigint unsigned NOT NULL COMMENT 'Account ID', + `data_center_id` bigint unsigned NOT NULL COMMENT 'Data center ID', + `state` varchar(12) NOT NULL COMMENT 'State of the shared filesystem in the FSM', + `fs_provider_name` varchar(255) COMMENT 'Name of the shared filesystem provider', + `protocol` varchar(10) COMMENT 'Protocol supported by the shared filesystem', + `volume_id` bigint unsigned COMMENT 'Volume which the shared filesystem is using as storage', + `vm_id` bigint unsigned COMMENT 'vm on which the shared filesystem is hosted', + `fs_type` varchar(10) NOT NULL COMMENT 'The filesystem format to be used for the shared filesystem', + `service_offering_id` bigint unsigned COMMENT 'Service offering for the vm', + `update_count` bigint unsigned COMMENT 'Update count for state change', + `updated` datetime COMMENT 'date updated', + `created` datetime NOT NULL COMMENT 'date created', + `removed` datetime COMMENT 'date removed if not null', + PRIMARY KEY (`id`), + CONSTRAINT `uc_shared_filesystem__uuid` UNIQUE (`uuid`), + INDEX `i_shared_filesystem__account_id`(`account_id`), + INDEX `i_shared_filesystem__domain_id`(`domain_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +DROP VIEW IF EXISTS `cloud`.`shared_filesystem_view`; Review Comment: Done ########## ui/src/config/section/storage.js: ########## @@ -543,6 +543,142 @@ export default { groupMap: (selection) => { return selection.map(x => { return { id: x } }) } } ] + }, + { + name: 'sharedfs', + title: 'label.sharedfs', + icon: 'file-text-outlined', + permission: ['listSharedFileSystems'], + resourceType: 'SharedFS', + columns: () => { + const fields = ['name', 'state', 'sizegb'] + const metricsFields = ['diskkbsread', 'diskkbswrite', 'utilization', 'physicalsize'] + + if (store.getters.metrics) { + fields.push(...metricsFields) + } + if (store.getters.userInfo.roletype === 'Admin') { + fields.push('storage') + fields.push('account') + } else if (store.getters.userInfo.roletype === 'DomainAdmin') { + fields.push('account') + } + if (store.getters.listAllProjects) { + fields.push('project') + } + fields.push('zonename') + + return fields + }, + details: ['id', 'name', 'description', 'state', 'filesystem', 'diskofferingdisplaytext', 'ipaddress', 'sizegb', 'provider', 'protocol', 'provisioningtype', 'utilization', 'diskkbsread', 'diskkbswrite', 'diskioread', 'diskiowrite', 'account', 'domain', 'created'], + tabs: [{ + component: shallowRef(defineAsyncComponent(() => import('@/views/storage/SharedFSTab.vue'))) + }], + searchFilters: () => { + var filters = ['name', 'zoneid', 'domainid', 'account', 'networkid', 'serviceofferingid', 'diskofferingid'] + return filters + }, + actions: [ + { + api: 'createSharedFileSystem', + icon: 'plus-outlined', + docHelp: 'adminguide/storage.html#creating-a-new-file-share', + label: 'label.create.sharedfs', + listView: true, + popup: true, + component: shallowRef(defineAsyncComponent(() => import('@/views/storage/CreateSharedFS.vue'))) + }, + { + api: 'updateSharedFileSystem', + icon: 'edit-outlined', + docHelp: 'adminguide/storage.html#lifecycle-operations', + label: 'label.update.sharedfs', + dataView: true, + popup: true, + component: shallowRef(defineAsyncComponent(() => import('@/views/storage/UpdateSharedFS.vue'))) + }, + { + api: 'startSharedFileSystem', + icon: 'caret-right-outlined', + label: 'label.action.start.sharedfs', + message: 'message.action.start.sharedfs', + docHelp: 'adminguide/storage.html#lifecycle-operations', + dataView: true, + show: (record) => { return ['Stopped'].includes(record.state) } + }, + { + api: 'stopSharedFileSystem', + icon: 'poweroff-outlined', + label: 'label.action.stop.sharedfs', + message: 'message.action.stop.sharedfs', + docHelp: 'adminguide/storage.html#lifecycle-operations', + dataView: true, + popup: true, Review Comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org