Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
05d3e9c5
Commit
05d3e9c5
authored
Aug 17, 2017
by
zhengchuan hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete useless code
parent
4bfe9b1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
31 deletions
+0
-31
openstack_instances.go
pkg/cloudprovider/providers/openstack/openstack_instances.go
+0
-31
No files found.
pkg/cloudprovider/providers/openstack/openstack_instances.go
View file @
05d3e9c5
...
@@ -24,7 +24,6 @@ import (
...
@@ -24,7 +24,6 @@ import (
"github.com/golang/glog"
"github.com/golang/glog"
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
"github.com/gophercloud/gophercloud/pagination"
"k8s.io/api/core/v1"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/types"
...
@@ -49,36 +48,6 @@ func (os *OpenStack) Instances() (cloudprovider.Instances, bool) {
...
@@ -49,36 +48,6 @@ func (os *OpenStack) Instances() (cloudprovider.Instances, bool) {
return
&
Instances
{
compute
},
true
return
&
Instances
{
compute
},
true
}
}
func
(
i
*
Instances
)
List
(
name_filter
string
)
([]
types
.
NodeName
,
error
)
{
glog
.
V
(
4
)
.
Infof
(
"openstack List(%v) called"
,
name_filter
)
opts
:=
servers
.
ListOpts
{
Name
:
name_filter
,
Status
:
"ACTIVE"
,
}
pager
:=
servers
.
List
(
i
.
compute
,
opts
)
ret
:=
make
([]
types
.
NodeName
,
0
)
err
:=
pager
.
EachPage
(
func
(
page
pagination
.
Page
)
(
bool
,
error
)
{
sList
,
err
:=
servers
.
ExtractServers
(
page
)
if
err
!=
nil
{
return
false
,
err
}
for
i
:=
range
sList
{
ret
=
append
(
ret
,
mapServerToNodeName
(
&
sList
[
i
]))
}
return
true
,
nil
})
if
err
!=
nil
{
return
nil
,
err
}
glog
.
V
(
3
)
.
Infof
(
"Found %v instances matching %v: %v"
,
len
(
ret
),
name_filter
,
ret
)
return
ret
,
nil
}
// Implementation of Instances.CurrentNodeName
// Implementation of Instances.CurrentNodeName
// Note this is *not* necessarily the same as hostname.
// Note this is *not* necessarily the same as hostname.
func
(
i
*
Instances
)
CurrentNodeName
(
hostname
string
)
(
types
.
NodeName
,
error
)
{
func
(
i
*
Instances
)
CurrentNodeName
(
hostname
string
)
(
types
.
NodeName
,
error
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment