=== natorious is now known as zz_natorious | ||
holger | hi all | 08:47 |
---|---|---|
holger | i have a config drive with a network_info.json | 08:48 |
holger | but does not work | 08:48 |
holger | how do i reference this file ? | 08:48 |
Odd_Bloke | claudiupopa: smoser: smatzek: harlowja: Meeting? | 14:00 |
smoser | claudiupopa, is not available. | 14:02 |
smoser | Odd_Bloke, yeah. | 14:02 |
smatzek | yeah | 14:04 |
Odd_Bloke | Here, I presume? | 14:05 |
smoser | yeah. | 14:06 |
smoser | ok. lets start. | 14:06 |
smoser | http://bit.ly/cloudinit-reviews-public | 14:08 |
smoser | claudiupopa, had the only review open | 14:08 |
smoser | i can respond there on the review | 14:08 |
smoser | i'll try to justify what i was thinking, and see if i can teas a response / thought from odd_bloke | 14:09 |
smoser | so my feeling was that if i'm loading a datasource, i quite likely am passing it some variables . rather than just NewDataSource() | 14:09 |
smoser | ie: NewDataSource(datasource_config=config, os=) | 14:10 |
smoser | and if we ever change that signature, then i'd like to have given the thing returning classes the ability to say "well i can only do version 1 signature" | 14:11 |
smoser | we could definitely just change that from arguments to the class's __init__ to a 'set_config' or something | 14:11 |
smoser | but it seems that they are more properly in the __init__ | 14:11 |
smoser | s/are more properly/fit more properly/ | 14:12 |
smoser | where as claudiupopa's solution woudl then have all the classes instantiated (for all possible versions) and then have to deal some other way with providing each class the datasource_config value | 14:12 |
smoser | or the instance get that data somehow | 14:13 |
smoser | thoughts ? | 14:13 |
Odd_Bloke | I'm just reminding myself how the loading works. :) | 14:13 |
Odd_Bloke | smoser: So it depends a little what we mean by "version", I think. | 14:18 |
Odd_Bloke | If we're talking about different internal-to-cloud-init versions of the DataSource implementation, then I think we can do either claudiupopa's way or your way. | 14:19 |
smoser | right. | 14:19 |
smoser | the point of the 'version' flag was to allow out-of-tree things | 14:19 |
smoser | (which is also the point of the dyanmic loading :) | 14:19 |
Odd_Bloke | Version will have to be an attribute on the class of DataSource. | 14:19 |
Odd_Bloke | And then DataSourceLoader could just do 'for data_source in data_sources: if data_source.version == 1: <instantiate one way> elif data_source.version == 2: <instantiate another> else: <throw hands in air>' | 14:21 |
Odd_Bloke | (Where on line 97, at the moment, it just does 'data_sources = (data_source() for data_source in data_sources)') | 14:21 |
smoser | Odd_Bloke, yeah, i hadnt thought of that. | 14:24 |
smoser | any other thoughts? because other wise, i think either way is fine | 14:24 |
Odd_Bloke | And we'd still have to do something like this, because the contract of module_providing_a_source.data_sources won't necessarily be static. | 14:25 |
smoser | you think ? | 14:25 |
Odd_Bloke | Well, if we're talking about instantiating data sources differently, then the thing which instantiates them might need different information with which to instantiate them. | 14:26 |
smatzek | I like Odd_Bloke's idea. I think it handles smoser's concern and allows claudiupopa's code to be unchanged, right? | 14:26 |
Odd_Bloke | For now it wouldn't need to be changed, yeah. | 14:27 |
smoser | i suppose.. | 14:27 |
smoser | then is ther ea sane way that we an do something reasonably smart now | 14:28 |
smoser | so that we can avoid | 14:28 |
smoser | if hasattr(class, 'data_sources_v1'): | 14:28 |
smoser | data_sources_v1() | 14:28 |
smoser | elif hasattr(class, 'data_sources_v2'): | 14:28 |
smoser | data_sources_v2(name1=value) | 14:28 |
smoser | or just live with that. | 14:29 |
Odd_Bloke | Well, we'd do: | 14:29 |
Odd_Bloke | if cls.version == '1': | 14:29 |
Odd_Bloke | cls() | 14:29 |
Odd_Bloke | elif cls.version == '2': | 14:29 |
Odd_Bloke | cls(name1=value) | 14:29 |
smoser | right. | 14:30 |
smoser | but then you said that 'data_sources' might be versioned | 14:30 |
smoser | need to be versioned | 14:30 |
Odd_Bloke | I don't think it will need to be if it's just returning classes. | 14:31 |
Odd_Bloke | It was when it was potentially going to be instantiating them that it would need more info. | 14:31 |
Odd_Bloke | If all else fails, we can do: | 14:31 |
Odd_Bloke | module_version = getattr(mod, 'version', 1) | 14:32 |
Odd_Bloke | if module_version == 1: | 14:32 |
Odd_Bloke | datasources() | 14:32 |
Odd_Bloke | elif module_version == 2: | 14:32 |
Odd_Bloke | datasources(name1=value) | 14:32 |
Odd_Bloke | We can expect DataSources to have attributes, because they should inherit from an abstract class. | 14:33 |
Odd_Bloke | But the beauty of a dynamic language is that we can defer that until later. | 14:35 |
smoser | oh. i read code wrong. | 14:36 |
smoser | yeah. | 14:36 |
smoser | ol. | 14:36 |
smoser | so i'm ok wi think with what is there. | 14:36 |
smoser | Odd_Bloke, you ahve anything else ? | 14:36 |
Odd_Bloke | I do not. | 14:36 |
smoser | i still have some reporter/webhook changes to get back into 2 | 14:36 |
smoser | smatzek, ? | 14:38 |
smoser | anyting from you? | 14:38 |
smatzek | I don't have anything else. | 14:38 |
Odd_Bloke | Meeting ends? | 14:40 |
smoser | meeting ends. | 14:44 |
Odd_Bloke | Thanks everyone. :) | 14:44 |
Odd_Bloke | smoser: If you have time to cut a new wily release, that's be much appreciated; we're just about ready to push up the SRUs for that fix. | 15:18 |
smoser | k | 15:18 |
Odd_Bloke | And the SRU team get fussy if they aren't actual backports. ;) | 15:19 |
=== zz_natorious is now known as natorious | ||
openstackgerrit | Merged stackforge/cloud-init: Add a version filtering strategy https://review.openstack.org/219220 | 18:18 |
natorious | weekly meeting anyone? | 19:02 |
=== blitz_ is now known as blitz___ | ||
=== natorious is now known as zz_natorious | ||
smoser | zz_natorious, Wed, 14:00:00 +0000 | 19:33 |
smoser | UTC 14:00 | 19:34 |
=== zz_natorious is now known as natorious | ||
=== natorious is now known as zz_natorious | ||
=== zz_natorious is now known as natorious | ||
natorious | smoser: yep, missed the UTC part for some reason. There is another dev from Rackspace, Ben Roble, who's been approved to work on the project as well. | 20:13 |
smoser | what timezone are you? | 20:14 |
natorious | I'm CST and he's EST | 20:14 |
smoser | the zzz confused me | 20:14 |
smoser | er.. zz | 20:14 |
natorious | yeah, thats znc doing its thing. /me looks into how disable | 20:15 |
smoser | ah | 20:16 |
natorious | I'm gonna go thru the review backlog just to familiar myself w/ master a bit. We have some req's from different product segments which I'll hold of on adding blueprints on till then. | 20:17 |
natorious | with this being dual license, would Ben need to sign the Canonical license agreement? | 20:18 |
natorious | or just the Openstack dev agreement? | 20:18 |
smoser | natorious, canonical license agreement. | 20:57 |
smoser | openstack dev agreement has nothing to do with it | 20:57 |
smoser | (which is admittedly confusing due to using stackforge) | 20:57 |
=== natorious is now known as zz_natorious |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!