PV & PVC Client implementation

This commit is contained in:
markturansky
2015-03-26 15:50:36 -04:00
parent c048e6fcbf
commit 95bd170ca2
38 changed files with 2058 additions and 30 deletions

View File

@@ -35,22 +35,26 @@ type FakeAction struct {
// Fake implements Interface. Meant to be embedded into a struct to get a default
// implementation. This makes faking out just the method you want to test easier.
type Fake struct {
Actions []FakeAction
PodsList api.PodList
CtrlList api.ReplicationControllerList
Ctrl api.ReplicationController
ServiceList api.ServiceList
EndpointsList api.EndpointsList
MinionsList api.NodeList
EventsList api.EventList
LimitRangesList api.LimitRangeList
ResourceQuotaStatus api.ResourceQuota
ResourceQuotasList api.ResourceQuotaList
NamespacesList api.NamespaceList
SecretList api.SecretList
Secret api.Secret
Err error
Watch watch.Interface
Actions []FakeAction
PodsList api.PodList
CtrlList api.ReplicationControllerList
Ctrl api.ReplicationController
ServiceList api.ServiceList
EndpointsList api.EndpointsList
MinionsList api.NodeList
EventsList api.EventList
LimitRangesList api.LimitRangeList
ResourceQuotaStatus api.ResourceQuota
ResourceQuotasList api.ResourceQuotaList
NamespacesList api.NamespaceList
SecretList api.SecretList
Secret api.Secret
Err error
Watch watch.Interface
PersistentVolume api.PersistentVolume
PersistentVolumesList api.PersistentVolumeList
PersistentVolumeClaim api.PersistentVolumeClaim
PersistentVolumeClaimList api.PersistentVolumeClaimList
}
func (c *Fake) LimitRanges(namespace string) LimitRangeInterface {
@@ -81,6 +85,14 @@ func (c *Fake) Pods(namespace string) PodInterface {
return &FakePods{Fake: c, Namespace: namespace}
}
func (c *Fake) PersistentVolumes() PersistentVolumeInterface {
return &FakePersistentVolumes{Fake: c}
}
func (c *Fake) PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface {
return &FakePersistentVolumeClaims{Fake: c, Namespace: namespace}
}
func (c *Fake) Services(namespace string) ServiceInterface {
return &FakeServices{Fake: c, Namespace: namespace}
}