openstackgerrit | Terry Howe proposed stackforge/python-openstacksdk: Remove version from path https://review.openstack.org/153095 | 00:24 |
---|---|---|
*** stevemar has quit IRC | 00:27 | |
*** pm90_ has quit IRC | 00:50 | |
*** rmcall has quit IRC | 00:51 | |
*** sigmavirus24 is now known as sigmavirus24_awa | 01:03 | |
*** chlong has joined #openstack-sdks | 01:05 | |
*** jamielennox|away is now known as jamielennox | 01:19 | |
*** chlong has quit IRC | 01:22 | |
*** etoews has quit IRC | 01:57 | |
*** etoews has joined #openstack-sdks | 02:01 | |
*** etoews has quit IRC | 02:23 | |
*** etoews has joined #openstack-sdks | 02:24 | |
*** chlong has joined #openstack-sdks | 02:26 | |
*** tellesnobrega_ has quit IRC | 02:31 | |
*** etoews has quit IRC | 02:38 | |
*** chlong has quit IRC | 02:40 | |
*** tellesnobrega_ has joined #openstack-sdks | 02:53 | |
*** tellesnobrega_ has quit IRC | 02:59 | |
*** tellesnobrega_ has joined #openstack-sdks | 03:12 | |
*** stevemar has joined #openstack-sdks | 03:12 | |
*** rmcall has joined #openstack-sdks | 03:13 | |
*** rmcall has quit IRC | 03:14 | |
*** rmcall has joined #openstack-sdks | 03:15 | |
*** rmcall_ has joined #openstack-sdks | 03:19 | |
*** rmcall has quit IRC | 03:21 | |
*** rmcall_ has quit IRC | 03:23 | |
*** rmcall has joined #openstack-sdks | 03:25 | |
*** rmcall has quit IRC | 03:29 | |
*** chlong has joined #openstack-sdks | 03:30 | |
*** rmcall has joined #openstack-sdks | 03:30 | |
*** chlong has quit IRC | 03:37 | |
*** stevemar has quit IRC | 03:38 | |
*** etoews has joined #openstack-sdks | 03:39 | |
*** stevemar has joined #openstack-sdks | 03:40 | |
*** etoews has quit IRC | 03:44 | |
*** rmcall has quit IRC | 03:46 | |
*** rmcall has joined #openstack-sdks | 03:47 | |
openstackgerrit | Brian Curtin proposed stackforge/python-openstacksdk: Add logging functionality to openstack.utils https://review.openstack.org/153127 | 03:49 |
*** rmcall_ has joined #openstack-sdks | 03:56 | |
*** rmcall has quit IRC | 03:57 | |
*** rmcall_ is now known as rmcall | 03:57 | |
*** pm90_ has joined #openstack-sdks | 03:59 | |
*** rmcall has quit IRC | 04:00 | |
*** rmcall has joined #openstack-sdks | 04:03 | |
*** rmcall has quit IRC | 04:08 | |
*** etoews has joined #openstack-sdks | 04:14 | |
*** etoews has quit IRC | 04:18 | |
*** chlong has joined #openstack-sdks | 04:35 | |
*** chlong has quit IRC | 04:54 | |
*** chlong has joined #openstack-sdks | 05:03 | |
openstackgerrit | Brian Curtin proposed stackforge/python-openstacksdk: Build up contributor documentation section https://review.openstack.org/151902 | 05:09 |
*** etoews has joined #openstack-sdks | 05:15 | |
*** etoews has quit IRC | 05:19 | |
*** pm90_ has quit IRC | 05:50 | |
*** tellesnobrega_ has quit IRC | 05:58 | |
*** rmcall has joined #openstack-sdks | 06:06 | |
*** etoews has joined #openstack-sdks | 06:16 | |
openstackgerrit | OpenStack Proposal Bot proposed openstack/python-openstackclient: Imported Translations from Transifex https://review.openstack.org/150700 | 06:18 |
*** etoews has quit IRC | 06:20 | |
*** rmcall has quit IRC | 06:26 | |
*** etoews has joined #openstack-sdks | 06:57 | |
*** etoews has quit IRC | 07:02 | |
*** chlong has quit IRC | 07:39 | |
*** etoews has joined #openstack-sdks | 07:58 | |
*** terrylhowe has quit IRC | 08:00 | |
*** etoews has quit IRC | 08:02 | |
*** stevemar has quit IRC | 08:12 | |
*** etoews has joined #openstack-sdks | 08:59 | |
*** etoews has quit IRC | 09:03 | |
*** etoews has joined #openstack-sdks | 10:00 | |
*** etoews has quit IRC | 10:04 | |
*** tellesnobrega_ has joined #openstack-sdks | 10:28 | |
*** tellesnobrega_ has quit IRC | 10:43 | |
*** tellesnobrega_ has joined #openstack-sdks | 10:45 | |
*** chlong has joined #openstack-sdks | 10:50 | |
*** etoews has joined #openstack-sdks | 11:00 | |
*** etoews has quit IRC | 11:05 | |
*** tellesnobrega_ has quit IRC | 11:10 | |
*** terrylhowe has joined #openstack-sdks | 11:13 | |
openstackgerrit | Terry Howe proposed stackforge/python-openstacksdk: Fix telemetry resource paths https://review.openstack.org/153197 | 11:30 |
openstackgerrit | Merged stackforge/python-openstacksdk: Remove version from path https://review.openstack.org/153095 | 11:36 |
*** chlong has quit IRC | 12:38 | |
*** etoews has joined #openstack-sdks | 13:02 | |
*** etoews has quit IRC | 13:07 | |
*** etoews has joined #openstack-sdks | 13:25 | |
*** etoews has quit IRC | 13:38 | |
*** etoews has joined #openstack-sdks | 13:39 | |
*** etoews has quit IRC | 14:03 | |
*** pm90_ has joined #openstack-sdks | 14:57 | |
*** pm90_ has quit IRC | 14:58 | |
*** pm90_ has joined #openstack-sdks | 14:59 | |
*** sigmavirus24_awa is now known as sigmavirus24 | 15:00 | |
*** etoews has joined #openstack-sdks | 15:06 | |
*** rmcall has joined #openstack-sdks | 15:06 | |
*** rmcall has quit IRC | 15:17 | |
*** rmcall has joined #openstack-sdks | 15:39 | |
*** pm90_ has quit IRC | 15:42 | |
*** rmcall has quit IRC | 15:44 | |
*** stevemar has joined #openstack-sdks | 15:50 | |
*** ayoung has quit IRC | 16:49 | |
*** pm90_ has joined #openstack-sdks | 16:50 | |
*** mattfarina has joined #openstack-sdks | 17:01 | |
etoews | how do i use Connection.network.create_network()? | 17:15 |
etoews | according to Usage it's https://github.com/stackforge/python-openstacksdk/blob/master/doc/source/users/usage.rst#L24 | 17:15 |
etoews | conn.network.create_network({"name": "matrix"}) | 17:15 |
etoews | but running that raises | 17:15 |
etoews | TypeError: create_network() takes exactly 1 argument (2 given) | 17:15 |
etoews | in jenkins.py https://github.com/stackforge/python-openstacksdk/blob/master/examples/jenkins.py#L42 | 17:17 |
etoews | conn.network.create_network(name=name) | 17:17 |
*** pm90_ has quit IRC | 17:17 | |
*** pm90_ has joined #openstack-sdks | 17:18 | |
*** rmcall has joined #openstack-sdks | 17:21 | |
*** ayoung has joined #openstack-sdks | 17:26 | |
sigmavirus24 | etoews: probably takes (self, **kwargs), so I assume you need to pass it as a keyword argument | 17:33 |
etoews | sigmavirus24: def create_network(self, **data): | 17:33 |
sigmavirus24 | yeah **kwargs and **data are the same | 17:34 |
etoews | that's just like kwargs right? | 17:34 |
etoews | k | 17:34 |
sigmavirus24 | It just means you have to name your parameter | 17:34 |
sigmavirus24 | you can't do positional parameters with **keyword-args | 17:34 |
sigmavirus24 | also I really wish Python was more like lisps in allow me to use hyphenated variable names | 17:34 |
etoews | thx for the pointer. | 17:35 |
*** ayoung has quit IRC | 17:57 | |
*** mattfarina has quit IRC | 18:19 | |
openstackgerrit | Everett Toews proposed stackforge/python-openstacksdk: Fix the example on the Usage page https://review.openstack.org/153323 | 18:19 |
*** etoews has quit IRC | 18:26 | |
*** etoews has joined #openstack-sdks | 18:27 | |
*** mattfarina has joined #openstack-sdks | 18:28 | |
*** Shrews has quit IRC | 18:46 | |
*** Shrews has joined #openstack-sdks | 18:48 | |
*** mattfarina has quit IRC | 18:57 | |
*** mattfarina has joined #openstack-sdks | 19:01 | |
*** ayoung has joined #openstack-sdks | 19:18 | |
*** Shrews has quit IRC | 19:20 | |
openstackgerrit | Merged stackforge/python-openstacksdk: Fix the example on the Usage page https://review.openstack.org/153323 | 19:21 |
*** pm90_ has quit IRC | 19:40 | |
*** pm90_ has joined #openstack-sdks | 19:41 | |
*** sigmavirus24 is now known as sigmavirus24_awa | 20:21 | |
openstackgerrit | Brian Curtin proposed stackforge/python-openstacksdk: Build up user documentation section https://review.openstack.org/151886 | 20:22 |
openstackgerrit | Brian Curtin proposed stackforge/python-openstacksdk: Build up contributor documentation section https://review.openstack.org/151902 | 20:24 |
etoews | oh sure. sigmavirus24_awa is away just when i need an rfc reader. | 20:47 |
openstackgerrit | Brian Curtin proposed stackforge/python-openstacksdk: Add API docs for network.v2 https://review.openstack.org/152374 | 20:51 |
openstackgerrit | Brian Curtin proposed stackforge/python-openstacksdk: Document compute/v2 resources https://review.openstack.org/151961 | 20:51 |
*** Shrews has joined #openstack-sdks | 21:17 | |
etoews | briancurtin: was this just a rebase? https://review.openstack.org/#/c/151886/4/ | 21:29 |
briancurtin | etoews: yes, i forgot i could just hit the rebase button. same with the other doc review | 21:30 |
*** pm90__ has joined #openstack-sdks | 21:30 | |
*** pm90_ has quit IRC | 21:30 | |
etoews | k | 21:30 |
*** pm90__ has quit IRC | 21:32 | |
*** pm90_ has joined #openstack-sdks | 21:32 | |
*** dhellmann_ has joined #openstack-sdks | 21:51 | |
etoews | i found this really useful http://adam.younglogic.com/2012/12/what-changed/ | 21:55 |
*** dhellmann_ has quit IRC | 21:55 | |
*** dhellmann_ has joined #openstack-sdks | 21:57 | |
*** dhellmann_ has quit IRC | 21:58 | |
*** etoews_ has joined #openstack-sdks | 22:01 | |
*** etoews has quit IRC | 22:02 | |
*** mattfarina has quit IRC | 22:02 | |
*** dhellmann_ has joined #openstack-sdks | 22: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#L24 | 22:07 |
*** dhellmann_ has quit IRC | 22:08 | |
*** pm90_ has quit IRC | 22:15 | |
*** dhellmann_ has joined #openstack-sdks | 22:20 | |
*** pm90_ has joined #openstack-sdks | 22: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 |
briancurtin | leave the last line off and it's good | 22:54 |
briancurtin | er, and the name_attribute one | 22:55 |
etoews_ | that's what i was wondering | 22:55 |
etoews_ | so what's the value of the name_attribute then? | 22:55 |
briancurtin | if the name is something other than name, but there's no need to include name and stack_name | 22:55 |
etoews_ | so stack_name was already there... | 22:55 |
briancurtin | remove 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 |
briancurtin | we should normalize away as much as possible. if it has a name it should have only one name | 22:56 |
briancurtin | because we don't want "stack_name" as an attribute on hte Stack object when we have the name attribute | 22:57 |
briancurtin | there should be one way to get the name of a stack. Stack.name | 22:57 |
etoews_ | right | 22:57 |
etoews_ | i guess i thought that was the purpose of name_attribute = 'stack_name' | 22:58 |
briancurtin | the name_attribute=stack_name would depend on there being an existing attribute on the class called stack_name | 22:58 |
etoews_ | well there was until i removed it | 22:58 |
briancurtin | removing it is good | 22:59 |
briancurtin | the only place "stack_name" should appear is as the argument to resource.prop | 22: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 |
briancurtin | i dont really know. it's used by Resource.find and openstack/compute/v2/keypair.py apparently makes use of it | 23:09 |
briancurtin | i 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 name | 23:10 |
etoews_ | i saw that code | 23:10 |
etoews_ | it looked pretty weird to me | 23: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#L51 | 23:12 |
etoews_ | i can add 'sadfsadf': '0' to EXAMPLE | 23:13 |
etoews_ | and self.assertEqual(EXAMPLE['sadfsadf'], sot.sadfsadf) to test_make_it | 23:13 |
etoews_ | and i think i understand why i passes but i don't see the value in the test | 23:13 |
etoews_ | briancurtin ^ | 23:14 |
briancurtin | it'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 set | 23:16 |
briancurtin | you added something to a dictionary and it got created. pass | 23:16 |
briancurtin | etoews_: 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, like | 23: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 obj | 23:23 |
*** chlong has joined #openstack-sdks | 23:23 | |
etoews_ | ah. that makes sense | 23:23 |
briancurtin | etoews_: this does some of that X-blah checking https://github.com/stackforge/python-openstacksdk/blob/master/openstack/tests/object_store/v1/test_container.py#L75 | 23:25 |
etoews_ | right. and this is a good test for the stack_name to name too right? | 23:26 |
briancurtin | yep, 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 |
briancurtin | that's another one of the things exercised by those tests, the swapping of names, specifically the id and name values | 23:29 |
*** pm90_ has quit IRC | 23:46 | |
*** pm90_ has joined #openstack-sdks | 23:48 | |
*** etoews_ has quit IRC | 23:49 | |
*** openstack has joined #openstack-sdks | 23:58 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!