-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
} | ||
|
||
def test_list_network_attachments(self, db): | ||
api.node_register('node-99', 'ipmihost', 'root', 'tapeworm') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any ideas on why this is failing the Travis checks?
getting a type error that node_register takes only one argument
I am not getting the same error locally and none of the other tests are failing with this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SahilTikale - does the OBM IPMI change we just merged require a
different config file to load the correct drivers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was a change to the node_register call that was required by the OBM IPMI change - I didnt have it locally so I didnt run into the issue there and all the other tests were getting fixed by git when it merged.
I just changed my calls to node_register to match the new syntax and it was fine
|
||
`POST /project/<project>/add_network` | ||
|
||
Add a network to project named <project>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you reflect that you are adding access to a network for this and project_remove_network?
@xuhang57 Lucas, would you mind reviewing this since the list_networks code is yours? I made a few small changes because of the many to many project:network relationship and that public networks should have project access be 'None', but everything else should be the same. |
Thanks a lot Kyle! @kylehogan And it looks good to me and I agree with you that we should set them as 'None', which you have already fixed. |
There is an issue with the ownership of admin created networks now that a network can be accessed by multiple projects. I believe that the original intent was that if an admin created a network with access 'project1' then project1 would effectively be the 'owner' of the network. If a network was created by a project then the owner is obviously network.creator, but for admin created networks I don't think restricting these functions to admin users is in line with what was originally intended by having an admin create a network to be accessed by a project. I think it would make sense to have network specific admins to allow there to be a distinction between projects that are allowed to access the network and projects that are allowed to grant/remove access for other projects or delete the network etc. |
done pending review+discussion |
Joint effort with @shwsun
@henn carefully remind you that your hil is also outdated, don't know whether or not this could help solve the branch conflict yet. |
@henn I dont think the last 2 commit should be here, we have to get rid of it after all. |
if project is None: | ||
# List all nodes connected to network. | ||
# Only the project that owns the network should be able to list attached nodes | ||
auth_backend.require_project_access(network.owner) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe network.owner can be None
, which denotes admin ownership
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
Originally, I was expecting #636 to land first, which would have allowed None
. Now that we aren't doing that, I'll have fix this.
@shwsun - you're right. I got rid of the 2 travis CI commits. |
Currently, the server side isn't accepting the GET arguments, but this should pass them correctly.
Also, for functionality of the optional GET argument in list_network_attachments(), this depends on #644. |
This is listed as waiting on +2, but it has merge conflicts. |
Also, it has /sixty-eight/ commits, eight of which are internal merge commits, and quite a few of which are typo fixes that shouldn't have their own commits. |
Indeed, some rebasing/squashing would not go amiss. |
FYI - since some merging is necessary, the plan discussed between
|
@henn, sounds good to me. |
Hi @henn is this pull request still active, or will a new pr be created with this branch merged? Thanks! |
Spoke to @henn about the next things for me to work on, first thing on the list is getting this sorted out. I've got a branch on which I'm working on resolving the conflicts and cleaning up the history; I'll open a new pr once it's worth a look. I'm going to close this one. |
functionality to list all networks from #519
depends on #545 as the access parameter for networks was changed
this closes #519, #545, #520, #453, and possibly #496
the functionality for showing connected nodes is outside of show_network() currently, but could be implemented there instead
also affects #566, in a negative way