-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Block Storage API #151
Conversation
59fdf8d
to
4edda7a
Compare
4edda7a
to
3ad7516
Compare
@gierens is this change still a draft? It looks pretty good to me. Could use a full acceptance test, and at least some unit test failures seem real (I need to check the others). |
Yeah, I was a little busy the last couple of weeks, that's why I didn't add anything more up until now. But I wanted to at least provide the most important volume functions before turning it into a normal PR. And then for snapshots and other stuff, this could go into a follow-up PR.
I will now continue to work on this, I just added volume deletion and can also take a look at the failing jobs. |
I just added volume creation and with that I guess the most important functionality is present. On top of this I can now write a few integration tests and take a look at the still failing CI jobs. But after that the PR should be ready for review. |
The |
Let's see if #153 provides any improvement. |
@gierens if you rebase the patch, you'll pick up various CI fixes. Everything that fails afterwards is probably on you. |
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
….inner This allows to hide session details and just focus on the wrapped inner protocol::Volume. Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Great job, thank you! I've left a few comments inline, could you check them? Please let me know when I reach the point of abusing your patience, I can fix minor issues myself then :) |
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
…roperties Signed-off-by: Sandro-Alessio Gierens <[email protected]>
…ocol Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
We are not actually sure what this field does or how it is different from the migration_status, and the naming is a little uninformative. So, we simply skip it for now. Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
…teTime Signed-off-by: Sandro-Alessio Gierens <[email protected]>
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
@dtantsur Alright, I think I have addressed all comments and for the more complex cases as with the |
#[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
pub enum DateTime { | ||
WithTz(chrono::DateTime<chrono::FixedOffset>), | ||
WithoutTz(chrono::NaiveDateTime), |
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.
Won't this actually mean UTC?
pub snapshot_id: Option<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub backup_id: Option<String>, | ||
pub name: String, // not optional in spec, but doesn't work with None/null, only with "" |
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 be a helper for serialize_with (to convert None to "")
transparent_property! { | ||
#[doc = "Migration status."] | ||
migration_status: ref Option<String> | ||
} |
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.
Properties should be sorted here for easier navigation in the docs.
@gierens I hope you don't mind me squashing the commits: 58 may easily be more than we had in rust-openstack before that :) Let's continue the discussion around DateTime? I have a strong feeling that when they don't provide a timezone, they actually mean UTC. Could you try confirming? I'll hold releasing the changes until we solve the DateTime problem and maybe figure out enums. |
@dtantsur That's totally fine. I tend to do atomic commits because squashing is a lot easier than taking commits apart. I probably could've done an interactive rebase in the end to cleanup the history a bit. But now that this one is in we can work on the rest in smaller chunks/PRs. About the DateTime, yeah, I do share that suspicion. It's unfortunate the API reference is this vague. I'll experiment around a bit and get back to you then. About releasing, sure totally understandable. |
This starts adding the block storage API alias cinder. So far it implements rudimentary versions of list_volumes, find_volumes and get_volume with an equally minimal Volume struct. But I does compile and returns things. Although the cinder API is very similar to nova's API, this is currently closer to the image module. For example, at the moment it goes directly to the /volumes/detail endpoint, rather than defining some kind of VolumeSummary for /volumes and offering a detailed() as the compute module does. This is for simplicity, just to get things rolling. I need this at work, so I can invest a fair bit of time. I'll make it more consistent along the way.
This starts adding the block storage API alias cinder. So far it implements rudimentary versions of list_volumes, find_volumes and get_volume with an equally minimal Volume struct. But I does compile and returns things. Although the cinder API is very similar to nova's API, this is currently closer to the image module. For example, at the moment it goes directly to the /volumes/detail endpoint, rather than defining some kind of VolumeSummary for /volumes and offering a detailed() as the compute module does. This is for simplicity, just to get things rolling. I need this at work, so I can invest a fair bit of time. I'll make it more consistent along the way.
This starts adding the block storage API alias cinder. So far it implements rudimentary versions of
list_volumes
,find_volumes
andget_volume
with an equally minimalVolume
struct. But I does compile and returns things.Although the cinder API is very similar to nova's API, this is currently closer to the image module. For example, at the moment it goes directly to the
/volumes/detail
endpoint, rather than defining some kind ofVolumeSummary
for/volumes
and offering adetailed()
as thecompute
module does.This is for simplicity, just to get things rolling. I need this at work, so I can invest a fair bit of time. I'll make it more consistent along the way.