Move VagrantCloud into its own pkg

pull/6/head
Tim Hockin 2014-08-19 15:40:46 -07:00
parent b23bef26eb
commit eb9f3394c5
3 changed files with 9 additions and 6 deletions

View File

@ -29,6 +29,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/client" "github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider" "github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider"
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider/gce" "github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider/gce"
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider/vagrant"
"github.com/GoogleCloudPlatform/kubernetes/pkg/master" "github.com/GoogleCloudPlatform/kubernetes/pkg/master"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" "github.com/GoogleCloudPlatform/kubernetes/pkg/util"
verflag "github.com/GoogleCloudPlatform/kubernetes/pkg/version/flag" verflag "github.com/GoogleCloudPlatform/kubernetes/pkg/version/flag"
@ -86,7 +87,7 @@ func main() {
} }
case "vagrant": case "vagrant":
var err error var err error
cloud, err = cloudprovider.NewVagrantCloud() cloud, err = vagrant_cloud.NewVagrantCloud()
if err != nil { if err != nil {
glog.Fatalf("Couldn't connect to vagrant cloud: %#v", err) glog.Fatalf("Couldn't connect to vagrant cloud: %#v", err)
} }

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package cloudprovider package vagrant_cloud
import ( import (
"encoding/json" "encoding/json"
@ -24,6 +24,8 @@ import (
"net/http" "net/http"
neturl "net/url" neturl "net/url"
"sort" "sort"
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider"
) )
// VagrantCloud is an implementation of Interface, TCPLoadBalancer and Instances for developer managed Vagrant cluster // VagrantCloud is an implementation of Interface, TCPLoadBalancer and Instances for developer managed Vagrant cluster
@ -72,17 +74,17 @@ func NewVagrantCloud() (*VagrantCloud, error) {
} }
// TCPLoadBalancer returns an implementation of TCPLoadBalancer for Vagrant cloud // TCPLoadBalancer returns an implementation of TCPLoadBalancer for Vagrant cloud
func (v *VagrantCloud) TCPLoadBalancer() (TCPLoadBalancer, bool) { func (v *VagrantCloud) TCPLoadBalancer() (cloudprovider.TCPLoadBalancer, bool) {
return nil, false return nil, false
} }
// Instances returns an implementation of Instances for Vagrant cloud // Instances returns an implementation of Instances for Vagrant cloud
func (v *VagrantCloud) Instances() (Instances, bool) { func (v *VagrantCloud) Instances() (cloudprovider.Instances, bool) {
return v, true return v, true
} }
// Zones returns an implementation of Zones for Vagrant cloud // Zones returns an implementation of Zones for Vagrant cloud
func (v *VagrantCloud) Zones() (Zones, bool) { func (v *VagrantCloud) Zones() (cloudprovider.Zones, bool) {
return nil, false return nil, false
} }

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package cloudprovider package vagrant_cloud
import ( import (
"net/http" "net/http"