Thursday, 2015-02-05

openstackgerritTerry Howe proposed stackforge/python-openstacksdk: Remove version from path  https://review.openstack.org/15309500:24
*** stevemar has quit IRC00:27
*** pm90_ has quit IRC00:50
*** rmcall has quit IRC00:51
*** sigmavirus24 is now known as sigmavirus24_awa01:03
*** chlong has joined #openstack-sdks01:05
*** jamielennox|away is now known as jamielennox01:19
*** chlong has quit IRC01:22
*** etoews has quit IRC01:57
*** etoews has joined #openstack-sdks02:01
*** etoews has quit IRC02:23
*** etoews has joined #openstack-sdks02:24
*** chlong has joined #openstack-sdks02:26
*** tellesnobrega_ has quit IRC02:31
*** etoews has quit IRC02:38
*** chlong has quit IRC02:40
*** tellesnobrega_ has joined #openstack-sdks02:53
*** tellesnobrega_ has quit IRC02:59
*** tellesnobrega_ has joined #openstack-sdks03:12
*** stevemar has joined #openstack-sdks03:12
*** rmcall has joined #openstack-sdks03:13
*** rmcall has quit IRC03:14
*** rmcall has joined #openstack-sdks03:15
*** rmcall_ has joined #openstack-sdks03:19
*** rmcall has quit IRC03:21
*** rmcall_ has quit IRC03:23
*** rmcall has joined #openstack-sdks03:25
*** rmcall has quit IRC03:29
*** chlong has joined #openstack-sdks03:30
*** rmcall has joined #openstack-sdks03:30
*** chlong has quit IRC03:37
*** stevemar has quit IRC03:38
*** etoews has joined #openstack-sdks03:39
*** stevemar has joined #openstack-sdks03:40
*** etoews has quit IRC03:44
*** rmcall has quit IRC03:46
*** rmcall has joined #openstack-sdks03:47
openstackgerritBrian Curtin proposed stackforge/python-openstacksdk: Add logging functionality to openstack.utils  https://review.openstack.org/15312703:49
*** rmcall_ has joined #openstack-sdks03:56
*** rmcall has quit IRC03:57
*** rmcall_ is now known as rmcall03:57
*** pm90_ has joined #openstack-sdks03:59
*** rmcall has quit IRC04:00
*** rmcall has joined #openstack-sdks04:03
*** rmcall has quit IRC04:08
*** etoews has joined #openstack-sdks04:14
*** etoews has quit IRC04:18
*** chlong has joined #openstack-sdks04:35
*** chlong has quit IRC04:54
*** chlong has joined #openstack-sdks05:03
openstackgerritBrian Curtin proposed stackforge/python-openstacksdk: Build up contributor documentation section  https://review.openstack.org/15190205:09
*** etoews has joined #openstack-sdks05:15
*** etoews has quit IRC05:19
*** pm90_ has quit IRC05:50
*** tellesnobrega_ has quit IRC05:58
*** rmcall has joined #openstack-sdks06:06
*** etoews has joined #openstack-sdks06:16
openstackgerritOpenStack Proposal Bot proposed openstack/python-openstackclient: Imported Translations from Transifex  https://review.openstack.org/15070006:18
*** etoews has quit IRC06:20
*** rmcall has quit IRC06:26
*** etoews has joined #openstack-sdks06:57
*** etoews has quit IRC07:02
*** chlong has quit IRC07:39
*** etoews has joined #openstack-sdks07:58
*** terrylhowe has quit IRC08:00
*** etoews has quit IRC08:02
*** stevemar has quit IRC08:12
*** etoews has joined #openstack-sdks08:59
*** etoews has quit IRC09:03
*** etoews has joined #openstack-sdks10:00
*** etoews has quit IRC10:04
*** tellesnobrega_ has joined #openstack-sdks10:28
*** tellesnobrega_ has quit IRC10:43
*** tellesnobrega_ has joined #openstack-sdks10:45
*** chlong has joined #openstack-sdks10:50
*** etoews has joined #openstack-sdks11:00
*** etoews has quit IRC11:05
*** tellesnobrega_ has quit IRC11:10
*** terrylhowe has joined #openstack-sdks11:13
openstackgerritTerry Howe proposed stackforge/python-openstacksdk: Fix telemetry resource paths  https://review.openstack.org/15319711:30
openstackgerritMerged stackforge/python-openstacksdk: Remove version from path  https://review.openstack.org/15309511:36
*** chlong has quit IRC12:38
*** etoews has joined #openstack-sdks13:02
*** etoews has quit IRC13:07
*** etoews has joined #openstack-sdks13:25
*** etoews has quit IRC13:38
*** etoews has joined #openstack-sdks13:39
*** etoews has quit IRC14:03
*** pm90_ has joined #openstack-sdks14:57
*** pm90_ has quit IRC14:58
*** pm90_ has joined #openstack-sdks14:59
*** sigmavirus24_awa is now known as sigmavirus2415:00
*** etoews has joined #openstack-sdks15:06
*** rmcall has joined #openstack-sdks15:06
*** rmcall has quit IRC15:17
*** rmcall has joined #openstack-sdks15:39
*** pm90_ has quit IRC15:42
*** rmcall has quit IRC15:44
*** stevemar has joined #openstack-sdks15:50
*** ayoung has quit IRC16:49
*** pm90_ has joined #openstack-sdks16:50
*** mattfarina has joined #openstack-sdks17:01
etoewshow do i use Connection.network.create_network()?17:15
etoewsaccording to Usage it's https://github.com/stackforge/python-openstacksdk/blob/master/doc/source/users/usage.rst#L2417:15
etoewsconn.network.create_network({"name": "matrix"})17:15
etoewsbut running that raises17:15
etoewsTypeError: create_network() takes exactly 1 argument (2 given)17:15
etoewsin jenkins.py https://github.com/stackforge/python-openstacksdk/blob/master/examples/jenkins.py#L4217:17
etoewsconn.network.create_network(name=name)17:17
*** pm90_ has quit IRC17:17
*** pm90_ has joined #openstack-sdks17:18
*** rmcall has joined #openstack-sdks17:21
*** ayoung has joined #openstack-sdks17:26
sigmavirus24etoews: probably takes (self, **kwargs), so I assume you need to pass it as a keyword argument17:33
etoewssigmavirus24: def create_network(self, **data):17:33
sigmavirus24yeah **kwargs and **data are the same17:34
etoewsthat's just like kwargs right?17:34
etoewsk17:34
sigmavirus24It just means you have to name your parameter17:34
sigmavirus24you can't do positional parameters with **keyword-args17:34
sigmavirus24also I really wish Python was more like lisps in allow me to use hyphenated variable names17:34
etoewsthx for the pointer.17:35
*** ayoung has quit IRC17:57
*** mattfarina has quit IRC18:19
openstackgerritEverett Toews proposed stackforge/python-openstacksdk: Fix the example on the Usage page  https://review.openstack.org/15332318:19
*** etoews has quit IRC18:26
*** etoews has joined #openstack-sdks18:27
*** mattfarina has joined #openstack-sdks18:28
*** Shrews has quit IRC18:46
*** Shrews has joined #openstack-sdks18:48
*** mattfarina has quit IRC18:57
*** mattfarina has joined #openstack-sdks19:01
*** ayoung has joined #openstack-sdks19:18
*** Shrews has quit IRC19:20
openstackgerritMerged stackforge/python-openstacksdk: Fix the example on the Usage page  https://review.openstack.org/15332319:21
*** pm90_ has quit IRC19:40
*** pm90_ has joined #openstack-sdks19:41
*** sigmavirus24 is now known as sigmavirus24_awa20:21
openstackgerritBrian Curtin proposed stackforge/python-openstacksdk: Build up user documentation section  https://review.openstack.org/15188620:22
openstackgerritBrian Curtin proposed stackforge/python-openstacksdk: Build up contributor documentation section  https://review.openstack.org/15190220:24
etoewsoh sure. sigmavirus24_awa is away just when i need an rfc reader.20:47
openstackgerritBrian Curtin proposed stackforge/python-openstacksdk: Add API docs for network.v2  https://review.openstack.org/15237420:51
openstackgerritBrian Curtin proposed stackforge/python-openstacksdk: Document compute/v2 resources  https://review.openstack.org/15196120:51
*** Shrews has joined #openstack-sdks21:17
etoewsbriancurtin: was this just a rebase? https://review.openstack.org/#/c/151886/4/21:29
briancurtinetoews: yes, i forgot i could just hit the rebase button. same with the other doc review21:30
*** pm90__ has joined #openstack-sdks21:30
*** pm90_ has quit IRC21:30
etoewsk21:30
*** pm90__ has quit IRC21:32
*** pm90_ has joined #openstack-sdks21:32
*** dhellmann_ has joined #openstack-sdks21:51
etoewsi found this really useful http://adam.younglogic.com/2012/12/what-changed/21:55
*** dhellmann_ has quit IRC21:55
*** dhellmann_ has joined #openstack-sdks21:57
*** dhellmann_ has quit IRC21:58
*** etoews_ has joined #openstack-sdks22:01
*** etoews has quit IRC22:02
*** mattfarina has quit IRC22:02
*** dhellmann_ has joined #openstack-sdks22:03
etoews_terrylhowe: if you have a minute, what did you mean by this note? https://github.com/stackforge/python-openstacksdk/blob/master/openstack/orchestration/v1/stack.py#L2422:07
*** dhellmann_ has quit IRC22:08
*** pm90_ has quit IRC22:15
*** dhellmann_ has joined #openstack-sdks22:20
*** pm90_ has joined #openstack-sdks22:41
etoews_in heat the name of a stack is stack_name but in the os-sdk we always want a name attribute right?22:54
etoews_class Stack(resource.Resource):22:54
etoews_    name_attribute = 'stack_name'22:54
etoews_    name = resource.prop('stack_name')22:54
etoews_    stack_name = resource.prop('stack_name')22:54
briancurtinleave the last line off and it's good22:54
briancurtiner, and the name_attribute one22:55
etoews_that's what i was wondering22:55
etoews_so what's the value of the name_attribute then?22:55
briancurtinif the name is something other than name, but there's no need to include name and stack_name22:55
etoews_so stack_name was already there...22:55
briancurtinremove it and put "name = resource.prop('stack_name')"22:56
etoews_i'm still not understanding why i wouldn't do name_attribute = 'stack_name'22:56
briancurtinwe should normalize away as much as possible. if it has a name it should have only one name22:56
briancurtinbecause we don't want "stack_name" as an attribute on hte Stack object when we have the name attribute22:57
briancurtinthere should be one way to get the name of a stack. Stack.name22:57
etoews_right22:57
etoews_i guess i thought that was the purpose of name_attribute = 'stack_name'22:58
briancurtinthe name_attribute=stack_name would depend on there being an existing attribute on the class called stack_name22:58
etoews_well there was until i removed it22:58
briancurtinremoving it is good22:59
briancurtinthe only place "stack_name" should appear is as the argument to resource.prop22:59
etoews_so why would you ever use name_attribute if you always do name = resource.prop('weird_name')23:00
etoews_s/use/override/23:01
etoews_briancurtin ^23:08
briancurtini dont really know. it's used by Resource.find and openstack/compute/v2/keypair.py apparently makes use of it23:09
briancurtini know why keypair sets the name to id, because internally we have to have an ID for everything (which we use when updating or deleting), but i dont know for sure why it then sets the fingerprint to the name23:10
etoews_i saw that code23:10
etoews_it looked pretty weird to me23:11
etoews_i guess i'll file it away for now.23:11
etoews_what's the purpose of a test like this? https://github.com/stackforge/python-openstacksdk/blob/master/openstack/tests/orchestration/v1/test_stack.py#L5123:12
etoews_i can add 'sadfsadf': '0' to EXAMPLE23:13
etoews_and self.assertEqual(EXAMPLE['sadfsadf'], sot.sadfsadf) to test_make_it23:13
etoews_and i think i understand why i passes but i don't see the value in the test23:13
etoews_briancurtin ^23:14
briancurtinit's creating a Stack and seeing that it sets values on it. when values that are sent in correspond to resource.props, their type should be appropriately set23:16
briancurtinyou added something to a dictionary and it got created. pass23:16
briancurtinetoews_: it's primarily a test of the prop types when they're set, but also just that things don't get swallowed. technically you could put anything through there and it'd be created, because the base Resource takes a dictionary and sets those key/value pairs on the attr. it's also a place where you test those keys which aren't valid python names, like23:22
briancurtin"os-blah:foo" or headers "x-something-in-swift"23:22
briancurtin*on the obj, or i guess i could have said sets those attrs on the obj23:23
*** chlong has joined #openstack-sdks23:23
etoews_ah. that makes sense23:23
briancurtinetoews_: this does some of that X-blah checking https://github.com/stackforge/python-openstacksdk/blob/master/openstack/tests/object_store/v1/test_container.py#L7523:25
etoews_right. and this is a good test for the stack_name to name too right?23:26
briancurtinyep, so you would put stack_name in teh dict with some value, and then test that obj.name gets set to YOUR_DICT["stack_name"]23:27
briancurtinthat's another one of the things exercised by those tests, the swapping of names, specifically the id and name values23:29
*** pm90_ has quit IRC23:46
*** pm90_ has joined #openstack-sdks23:48
*** etoews_ has quit IRC23:49
*** openstack has joined #openstack-sdks23:58

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!