*** spzala has quit IRC | 00:56 | |
*** spzala has joined #openstack-heat-translator | 01:24 | |
*** spzala has quit IRC | 01:27 | |
*** spzala has joined #openstack-heat-translator | 01:27 | |
*** bobh has joined #openstack-heat-translator | 01:44 | |
*** bobh has quit IRC | 02:09 | |
*** spzala has quit IRC | 03:39 | |
openstackgerrit | Santhosh64 proposed openstack/heat-translator: Implemented Scaling policies in heat translator https://review.openstack.org/302636 | 05:39 |
---|---|---|
*** spzala has joined #openstack-heat-translator | 05:40 | |
*** spzala has quit IRC | 05:44 | |
*** spzala has joined #openstack-heat-translator | 12:25 | |
*** zhipeng has joined #openstack-heat-translator | 14:02 | |
*** zhipeng has quit IRC | 14:06 | |
*** zhipeng has joined #openstack-heat-translator | 14:07 | |
*** zhipeng has quit IRC | 14:42 | |
*** zhipeng has joined #openstack-heat-translator | 14:43 | |
*** bobh has joined #openstack-heat-translator | 14:43 | |
*** bobh has quit IRC | 14:49 | |
*** zhipeng has quit IRC | 16:27 | |
*** zhipeng has joined #openstack-heat-translator | 16:28 | |
*** bobh has joined #openstack-heat-translator | 16:46 | |
*** bobh has quit IRC | 16:51 | |
*** openstackgerrit_ has joined #openstack-heat-translator | 17:06 | |
*** openstackgerrit_ has quit IRC | 17:08 | |
*** shangxdy has joined #openstack-heat-translator | 17:11 | |
shangxdy | HI, spzala | 17:11 |
*** spzala has quit IRC | 17:12 | |
*** spzala has joined #openstack-heat-translator | 17:20 | |
*** spzala has quit IRC | 17:20 | |
*** spzala has joined #openstack-heat-translator | 17:20 | |
spzala | shangxdy: Hi | 17:22 |
spzala | shangxdy: up late :-) | 17:23 |
shangxdy | :) | 17:24 |
shangxdy | I have just now notice your comments. | 17:24 |
spzala | shangxdy: sure, does they make sense? | 17:24 |
spzala | shangxdy: I have just right now posted a comment | 17:24 |
spzala | shangxdy: drafted it but just published.. please take a look | 17:25 |
spzala | shangxdy: pointing exactly where in code I think we should be able to handle sub_mapping | 17:25 |
shangxdy | I agree code must be tested enough | 17:25 |
shangxdy | Ok | 17:26 |
spzala | shangxdy: thanks, but please look at my comment I just posted. | 17:26 |
shangxdy | "only setting sub_mapping to null in topology_template for now (which is null right now anyway) and build passes successfully" | 17:26 |
shangxdy | Are you sure to update the patch completely before your test? | 17:27 |
spzala | shangxdy: with that comment what I was saying is, if you remove all the changes you have in tosca_template.py that doesn't impact the build | 17:27 |
spzala | except that topology_template takes sub_map in arg which is set to null even with your changes I think.. | 17:28 |
spzala | As I commented, I would alway like to have patch backed by tests but for this patch | 17:28 |
shangxdy | I'll update and have a look | 17:28 |
spzala | shangxdy: cool, per my latest comment, I think it should be easy and proper way to handle sub_map by looking into imports and finding out which ones has sub_mapping based on keyword | 17:29 |
spzala | no need to modify constructor or iteratively call the ToscaTemplate class from within it | 17:29 |
shangxdy | Do you notice the test function | 17:30 |
shangxdy | Do you notice the test function | 17:30 |
shangxdy | Do you notice the test function test_system_template(self) in test_topology_template.py? | 17:30 |
spzala | also, I was saying that the method you have added in tosca_template.py are not tested and has no impact, you can remove them for now from this patch and add them with tests that you have already planned for | 17:31 |
spzala | yes I did | 17:31 |
spzala | but that should pass jenkins unless I made some local changes and that made tox pass :( | 17:32 |
spzala | but if anything that I missed and is needed to pass the test method, I am totally fine with it | 17:32 |
shangxdy | I have test part of the patch, and if you set sub_mapping to none, the test function will run error | 17:33 |
spzala | my main concerned is modifying the constructor | 17:33 |
spzala | do you think my latest comment is something you can incorporate ? | 17:34 |
shangxdy | Your test is main about the constructor without extra param? | 17:34 |
spzala | for sub_mapping the time it makes sense is when the imported templates has that section | 17:35 |
spzala | and in that we substitute node in main template which is passed to the ToscaTemple | 17:35 |
spzala | so that's the main case that needs to be handled | 17:35 |
spzala | yup that's my main concern | 17:36 |
spzala | iterating over template imports it should be easy to get which one is meant for sub_mapping | 17:37 |
shangxdy | "a method here to get all the templates" the all templates means nested templates? | 17:38 |
spzala | all the templates that offers substitution_mapping | 17:39 |
spzala | I believe that's what you need right? | 17:40 |
spzala | once you have that, then I guess you can use that with many of your current methods you have | 17:40 |
shangxdy | I think so, but now the patch find the nested templates too, they are only instantiated before matching the node template | 17:41 |
spzala | you can use the same method to find all nested templates as well, again you need to iterate over imports | 17:42 |
spzala | so nested templates are superset and one with sub_mappings are subset of it | 17:42 |
spzala | since it's a big patch I would usually find it more useful and test if we iteratively add patches as needed | 17:43 |
spzala | so if we can handle substitute mappings that should enable initial support for it | 17:44 |
spzala | and you can add more on top of it as needed | 17:44 |
shangxdy | "iterating over template imports" is based on the raw yaml format? | 17:45 |
shangxdy | Ok, we can import the nested template first. It's sure too big patch | 17:45 |
spzala | once we load templates, we have a method in Imports.py that iterates over list of imports ("importslist" var) | 17:47 |
*** bobh has joined #openstack-heat-translator | 17:47 | |
shangxdy | I may not express my whole idea completely in the patch. | 17:47 |
*** zhipeng has quit IRC | 17:47 | |
spzala | i guess that gives all the nested (imports) templates | 17:48 |
spzala | shangxdy: sure, so if you can only provide support for sub_mappings with the current test templates you have modified and provide tests for validating them and substitute that would be great | 17:49 |
spzala | shangxdy: and by all mean, it's a great work .. the sub_mappings.py you have added is great | 17:49 |
shangxdy | I think it's no problem to get all the imported templates, the point is to associate them with node templates. | 17:50 |
spzala | so if you can get list of all templates that supports sub_mapping before call to the topology_templates it should be in similar line to with what you have | 17:51 |
*** bobh has quit IRC | 17:52 | |
spzala | that's | 17:52 |
spzala | if self.topology_template.tpl: | 17:52 |
spzala | you get all templates that provides sub_mapping | 17:52 |
spzala | and then you already have call later where you use it, | 17:52 |
spzala | return TopologyTemplate(self._tpl_topology_template(), | 17:52 |
spzala | self._get_all_custom_defs(), | 17:52 |
spzala | self.relationship_types, | 17:52 |
spzala | self.parsed_params, | 17:52 |
spzala | self.sub_mapped_node_template) | 17:52 |
spzala | hopefully you don't need to change flow much | 17:53 |
shangxdy | In ToscaTemplate create all TopologyTemplate objects? not nested toscatemplate objects? | 17:56 |
shangxdy | I thought doubt It, but this solution will miss some informations such as repo. | 17:58 |
spzala | no I am saying that once you get all the template which offers sub_mappings | 17:58 |
spzala | you should be able to go with your flow without nested toscatemplate objects | 17:59 |
spzala | (we should avoid modifying constructor and nested toscatemplate objects) | 18:00 |
shangxdy | How to get all the nested template except the solution in the patch? | 18:01 |
shangxdy | I know your concern "avoid modifying constructor":) | 18:02 |
spzala | :) ok, let's try one more time or I will try to modify code: | 18:02 |
spzala | 1. get all the templates that offers sub_mappings | 18:02 |
shangxdy | fine, can you give the modified code about that? | 18:04 |
spzala | OK, let me try working on it and I will get in touch with you | 18:04 |
spzala | I will be starting to work on tosca parser release so please bear with me if I take some time | 18:05 |
spzala | when are you going on vacation? | 18:05 |
spzala | or are you already on vacation? :) | 18:06 |
shangxdy | :) I'll try to avoid modifying the constructor, but i give up because of diffculty | 18:06 |
spzala | shangxdy: :) no worries, if you can try on that please put some thoughts, and meanwhile I will start modifying the patch locally and see how it goes | 18:07 |
shangxdy | The difficulty come from much code modified and heat translator. | 18:08 |
spzala | shangxdy: agree it's difficult but let's try, once we modify the signature of constructor and make a release we are stuck with it due to backward compatibility reason | 18:09 |
shangxdy | With current patch, heat-translator will be easy to support sub_mapping. | 18:09 |
spzala | shangxdy: sure, my attempt is to keep current flow much same as possible, but adding arg when it's not needed that's something we need to avoid | 18:10 |
spzala | for a method signature it's ok, but for an entry class it's not unless we can't find any other way | 18:11 |
shangxdy | Ok, let's try, i'll do it again after vacation. | 18:11 |
spzala | shangxdy: ok, perfect | 18:11 |
spzala | shangxdy: thanks for your patience :) | 18:11 |
spzala | and have a great vacation time | 18:11 |
*** bobh has joined #openstack-heat-translator | 18:11 | |
shangxdy | :) thanks your patience too. | 18:12 |
spzala | shangxdy: :) no problem | 18:12 |
shangxdy | enjoy family vacation:) | 18:12 |
spzala | shangxdy: :) thanks, you too! | 18:13 |
spzala | shangxdy: bye | 18:13 |
shangxdy | bye:) | 18:13 |
spzala | :) | 18:13 |
*** shangxdy has quit IRC | 18:14 | |
*** spzala has quit IRC | 22:08 | |
*** spzala has joined #openstack-heat-translator | 22:08 | |
*** spzala has quit IRC | 22:13 | |
*** spzala has joined #openstack-heat-translator | 22:35 | |
*** spzala has quit IRC | 22:38 | |
*** spzala has joined #openstack-heat-translator | 22:38 | |
*** bobh has quit IRC | 22:47 | |
*** bobh has joined #openstack-heat-translator | 23:52 | |
*** spzala has quit IRC | 23:55 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!