diff options
-rwxr-xr-x | app/discover/events/listeners/default_listener.py | 6 | ||||
-rw-r--r-- | app/discover/fetchers/db/db_access.py | 2 | ||||
-rw-r--r-- | app/install/db/environments_config.json | 156 | ||||
-rw-r--r-- | app/test/api/responders_test/test_data/environment_configs.py | 4 | ||||
-rw-r--r-- | app/test/fetch/api_fetch/test_data/configurations.py | 6 | ||||
-rw-r--r-- | app/test/fetch/db_fetch/test_data/db_access.py | 2 | ||||
-rw-r--r-- | app/test/fetch/db_fetch/test_db_access.py | 2 | ||||
-rw-r--r-- | app/test/scan/test_data/scanner.py | 8 |
8 files changed, 93 insertions, 93 deletions
diff --git a/app/discover/events/listeners/default_listener.py b/app/discover/events/listeners/default_listener.py index a135673..9261cf8 100755 --- a/app/discover/events/listeners/default_listener.py +++ b/app/discover/events/listeners/default_listener.py @@ -189,6 +189,8 @@ class DefaultListener(ListenerBase, ConsumerMixin): inventory_collection = args["inventory"] MongoAccess.set_config_file(args["mongo_config"]) + inv = InventoryMgr() + inv.set_collections(inventory_collection) conf = Configuration(args["environments_collection"]) conf.use_env(env_name) @@ -207,15 +209,13 @@ class DefaultListener(ListenerBase, ConsumerMixin): if args["metadata_file"]: import_metadata(event_handler, event_queues, args["metadata_file"]) - inv = InventoryMgr() - inv.set_collections(inventory_collection) logger = FullLogger() logger.set_loglevel(args["loglevel"]) amqp_config = conf.get("AMQP") connect_url = 'amqp://{user}:{pwd}@{host}:{port}//' \ .format(user=amqp_config["user"], - pwd=amqp_config["password"], + pwd=amqp_config["pwd"], host=amqp_config["host"], port=amqp_config["port"]) diff --git a/app/discover/fetchers/db/db_access.py b/app/discover/fetchers/db/db_access.py index 00bd776..ffe539d 100644 --- a/app/discover/fetchers/db/db_access.py +++ b/app/discover/fetchers/db/db_access.py @@ -66,7 +66,7 @@ class DbAccess(Fetcher): cnf = self.conf cnf['schema'] = cnf['schema'] if 'schema' in cnf else 'nova' self.db_connect(cnf["host"], cnf["port"], - cnf["user"], cnf["password"], + cnf["user"], cnf["pwd"], cnf["schema"]) def get_objects_list_for_id(self, query, object_type, id): diff --git a/app/install/db/environments_config.json b/app/install/db/environments_config.json index 9e05687..81d659d 100644 --- a/app/install/db/environments_config.json +++ b/app/install/db/environments_config.json @@ -1,78 +1,78 @@ -[
-{
- "operational" : "stopped",
- "listen" : true,
- "configuration" : [
- {
- "name" : "OpenStack",
- "admin_token" : "sadgsgsagsa",
- "user" : "adminuser",
- "port" : 5000,
- "pwd" : "saggsgsasg",
- "host" : "10.0.0.1"
- },
- {
- "name" : "mysql",
- "password" : "sgasdggddsgsd",
- "port" : 3307,
- "user" : "mysqluser",
- "host" : "10.0.0.1"
- },
- {
- "name" : "CLI",
- "user" : "sshuser",
- "pwd" : "sagsagsagsa",
- "host" : "10.0.0.1"
- },
- {
- "name" : "AMQP",
- "password" : "sagssdgassgd",
- "port" : 5673,
- "user" : "rabbitmquser",
- "host" : "10.0.0.1"
- },
- {
- "rabbitmq_port" : 5671,
- "ssh_user" : "root",
- "server_name" : "sensu_server",
- "env_type" : "production",
- "provision" : "None",
- "name" : "Monitoring",
- "ssh_port" : 20022,
- "rabbitmq_pass" : "sagsagss",
- "ssh_password" : "calipsoasgsagdg",
- "rabbitmq_user" : "sensu",
- "config_folder" : "/local_dir/sensu_config",
- "type" : "Sensu",
- "server_ip" : "10.0.0.1",
- "api_port" : 4567
- },
- {
- "name" : "ACI",
- "user" : "admin",
- "pwd" : "Cisco123456",
- "host" : "10.1.1.104"
- }
- ],
- "enable_monitoring" : true,
- "name" : "DEMO-ENVIRONMENT-SCHEME",
- "distribution" : "Mirantis-8.0",
- "last_scanned" : "filled-by-scanning",
- "app_path" : "/home/scan/calipso_prod/app",
- "scanned" : false,
- "type_drivers" : "vxlan",
- "mechanism_drivers" : [
- "OVS"
- ],
- "user" : "wNLeBJxNDyw8G7Ssg",
- "auth" : {
- "edit-env" : [
- "wNLeBJxNDyw8G7Ssg"
- ],
- "view-env" : [
- "wNLeBJxNDyw8G7Ssg"
- ]
- },
- "type" : "environment"
-}
-]
+[ +{ + "operational" : "stopped", + "listen" : true, + "configuration" : [ + { + "name" : "OpenStack", + "admin_token" : "sadgsgsagsa", + "user" : "adminuser", + "port" : 5000, + "pwd" : "saggsgsasg", + "host" : "10.0.0.1" + }, + { + "name" : "mysql", + "pwd" : "sgasdggddsgsd", + "port" : 3307, + "user" : "mysqluser", + "host" : "10.0.0.1" + }, + { + "name" : "CLI", + "user" : "sshuser", + "pwd" : "sagsagsagsa", + "host" : "10.0.0.1" + }, + { + "name" : "AMQP", + "pwd" : "sagssdgassgd", + "port" : 5673, + "user" : "rabbitmquser", + "host" : "10.0.0.1" + }, + { + "rabbitmq_port" : 5671, + "ssh_user" : "root", + "server_name" : "sensu_server", + "env_type" : "production", + "provision" : "None", + "name" : "Monitoring", + "ssh_port" : 20022, + "rabbitmq_pass" : "sagsagss", + "ssh_password" : "calipsoasgsagdg", + "rabbitmq_user" : "sensu", + "config_folder" : "/local_dir/sensu_config", + "type" : "Sensu", + "server_ip" : "10.0.0.1", + "api_port" : 4567 + }, + { + "name" : "ACI", + "user" : "admin", + "pwd" : "Cisco123456", + "host" : "10.1.1.104" + } + ], + "enable_monitoring" : true, + "name" : "DEMO-ENVIRONMENT-SCHEME", + "distribution" : "Mirantis-8.0", + "last_scanned" : "filled-by-scanning", + "app_path" : "/home/scan/calipso_prod/app", + "scanned" : false, + "type_drivers" : "vxlan", + "mechanism_drivers" : [ + "OVS" + ], + "user" : "wNLeBJxNDyw8G7Ssg", + "auth" : { + "edit-env" : [ + "wNLeBJxNDyw8G7Ssg" + ], + "view-env" : [ + "wNLeBJxNDyw8G7Ssg" + ] + }, + "type" : "environment" +} +] diff --git a/app/test/api/responders_test/test_data/environment_configs.py b/app/test/api/responders_test/test_data/environment_configs.py index 2a67fb6..a9e8885 100644 --- a/app/test/api/responders_test/test_data/environment_configs.py +++ b/app/test/api/responders_test/test_data/environment_configs.py @@ -164,7 +164,7 @@ ENV_CONFIG = { { "host": "10.56.20.239", "name": "mysql", - "password": "G1VKEbcqKZXoPthrtNma2D9Y", + "pwd": "G1VKEbcqKZXoPthrtNma2D9Y", "port": "3307", "user": "root" }, @@ -185,7 +185,7 @@ ENV_CONFIG = { { "host": "10.56.20.239", "name": "AMQP", - "password": "YVWMiKMshZhlJCGqFu5PdT9d", + "pwd": "YVWMiKMshZhlJCGqFu5PdT9d", "port": "5673", "user": "nova" }, diff --git a/app/test/fetch/api_fetch/test_data/configurations.py b/app/test/fetch/api_fetch/test_data/configurations.py index ba15346..cca43be 100644 --- a/app/test/fetch/api_fetch/test_data/configurations.py +++ b/app/test/fetch/api_fetch/test_data/configurations.py @@ -13,7 +13,7 @@ CONFIGURATIONS = { "mock": "True", "host": "10.56.20.239", "name": "mysql", - "password": "102QreDdiD5sKcvNf9qbHrmr", + "pwd": "102QreDdiD5sKcvNf9qbHrmr", "port": 3307.0, "user": "root", "schema": "nova" @@ -38,7 +38,7 @@ CONFIGURATIONS = { "host": "10.56.20.239", "port": "5673", "user": "nova", - "password": "NF2nSv3SisooxPkCTr8fbfOa" + "pwd": "NF2nSv3SisooxPkCTr8fbfOa" } ], "distribution": "Mirantis-8.0", @@ -49,4 +49,4 @@ CONFIGURATIONS = { ], "operational": "yes", "type": "environment" -}
\ No newline at end of file +} diff --git a/app/test/fetch/db_fetch/test_data/db_access.py b/app/test/fetch/db_fetch/test_data/db_access.py index a4ad548..d7b10e5 100644 --- a/app/test/fetch/db_fetch/test_data/db_access.py +++ b/app/test/fetch/db_fetch/test_data/db_access.py @@ -10,7 +10,7 @@ DB_CONFIG = { "host": "10.56.20.239", "name": "mysql", - "password": "102QreDdiD5sKcvNf9qbHrmr", + "pwd": "102QreDdiD5sKcvNf9qbHrmr", "port": 3307.0, "user": "root", "schema": "nova" diff --git a/app/test/fetch/db_fetch/test_db_access.py b/app/test/fetch/db_fetch/test_db_access.py index 4ef3e74..ecc26e3 100644 --- a/app/test/fetch/db_fetch/test_db_access.py +++ b/app/test/fetch/db_fetch/test_db_access.py @@ -28,7 +28,7 @@ class TestDbAccess(TestFetch): db_connect.return_value = db_conn self.fetcher.db_connect(DB_CONFIG['host'], DB_CONFIG['port'], - DB_CONFIG['user'], DB_CONFIG['password'], + DB_CONFIG['user'], DB_CONFIG['pwd'], DB_CONFIG['schema']) self.assertEqual(True, db_connect.called, "connect method has't been called") diff --git a/app/test/scan/test_data/scanner.py b/app/test/scan/test_data/scanner.py index cebeca2..ebdee06 100644 --- a/app/test/scan/test_data/scanner.py +++ b/app/test/scan/test_data/scanner.py @@ -92,7 +92,7 @@ CONFIGURATIONS = { "mock": "True", "host": "10.56.20.239", "name": "mysql", - "password": "102QreDdiD5sKcvNf9qbHrmr", + "pwd": "102QreDdiD5sKcvNf9qbHrmr", "port": 3307.0, "user": "root", "schema": "nova" @@ -117,7 +117,7 @@ CONFIGURATIONS = { "host": "10.56.20.239", "port": "5673", "user": "nova", - "password": "NF2nSv3SisooxPkCTr8fbfOa" + "pwd": "NF2nSv3SisooxPkCTr8fbfOa" } ], "distribution": "Mirantis-8.0", @@ -302,7 +302,7 @@ CONFIGURATIONS_WITHOUT_MECHANISM_DRIVERS = { "mock": "True", "host": "10.56.20.239", "name": "mysql", - "password": "102QreDdiD5sKcvNf9qbHrmr", + "pwd": "102QreDdiD5sKcvNf9qbHrmr", "port": 3307.0, "user": "root", "schema": "nova" @@ -327,7 +327,7 @@ CONFIGURATIONS_WITHOUT_MECHANISM_DRIVERS = { "host": "10.56.20.239", "port": "5673", "user": "nova", - "password": "NF2nSv3SisooxPkCTr8fbfOa" + "pwd": "NF2nSv3SisooxPkCTr8fbfOa" } ], "distribution": "Mirantis-8.0", |