Created
January 28, 2021 10:24
-
-
Save flavio-fernandes/e32f71f48ed77699493aa8fbbc865a6e to your computer and use it in GitHub Desktop.
Neutron Packet Logging Framework
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://docs.openstack.org/neutron/victoria/admin/config-logging.html | |
``` | |
$ mysql | |
mysql> use neutron | |
mysql> show create table logs; | |
| logs | CREATE TABLE `logs` ( | |
`project_id` varchar(255) DEFAULT NULL, | |
`id` varchar(36) NOT NULL, | |
`standard_attr_id` bigint NOT NULL, | |
`name` varchar(255) DEFAULT NULL, | |
`resource_type` varchar(36) NOT NULL, | |
`resource_id` varchar(36) DEFAULT NULL, | |
`target_id` varchar(36) DEFAULT NULL, | |
`event` varchar(255) NOT NULL, | |
`enabled` tinyint(1) DEFAULT NULL, | |
PRIMARY KEY (`id`), | |
UNIQUE KEY `standard_attr_id` (`standard_attr_id`), | |
KEY `ix_logs_project_id` (`project_id`), | |
KEY `ix_logs_target_id` (`target_id`), | |
KEY `ix_logs_resource_id` (`resource_id`), | |
CONSTRAINT `logs_ibfk_1` FOREIGN KEY (`standard_attr_id`) REFERENCES `standardattributes` (`id`) ON DELETE CASCADE, | |
CONSTRAINT `logs_chk_1` CHECK ((`enabled` in (0,1))) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 | | |
``` | |
``` | |
mysql> select * | |
-> from information_schema.table_constraints | |
-> where table_name='logs'; | |
+--------------------+-------------------+------------------+--------------+------------+-----------------+----------+ | |
| CONSTRAINT_CATALOG | CONSTRAINT_SCHEMA | CONSTRAINT_NAME | TABLE_SCHEMA | TABLE_NAME | CONSTRAINT_TYPE | ENFORCED | | |
+--------------------+-------------------+------------------+--------------+------------+-----------------+----------+ | |
| def | neutron | PRIMARY | neutron | logs | PRIMARY KEY | YES | | |
| def | neutron | standard_attr_id | neutron | logs | UNIQUE | YES | | |
| def | neutron | logs_ibfk_1 | neutron | logs | FOREIGN KEY | YES | | |
| def | neutron | logs_chk_1 | neutron | logs | CHECK | YES | | |
+--------------------+-------------------+------------------+--------------+------------+-----------------+----------+ | |
4 rows in set (0.00 sec) | |
mysql> | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment