add delete precondition

This commit is contained in:
Chao Xu
2016-03-20 23:15:00 -07:00
parent 590038dcf1
commit 31b425b3a1
71 changed files with 1600 additions and 372 deletions

View File

@@ -1887,6 +1887,12 @@ type Binding struct {
Target ObjectReference `json:"target"`
}
// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
type Preconditions struct {
// Specifies the target UID.
UID *types.UID `json:"uid,omitempty"`
}
// DeleteOptions may be provided when deleting an API object
type DeleteOptions struct {
unversioned.TypeMeta `json:",inline"`
@@ -1894,7 +1900,11 @@ type DeleteOptions struct {
// Optional duration in seconds before the object should be deleted. Value must be non-negative integer.
// The value zero indicates delete immediately. If this value is nil, the default grace period for the
// specified type will be used.
GracePeriodSeconds *int64 `json:"gracePeriodSeconds"`
GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"`
// Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
// returned.
Preconditions *Preconditions `json:"preconditions,omitempty"`
}
// ExportOptions is the query options to the standard REST get call.