Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #619 from kaccardi/topic/fix-compute-port
Browse files Browse the repository at this point in the history
ciao-controller: Honor compute API port override
  • Loading branch information
markdryan authored Sep 30, 2016
2 parents 65203c1 + 635940a commit 37625c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ciao-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
datastore "github.com/01org/ciao/ciao-controller/internal/datastore"
image "github.com/01org/ciao/ciao-image/client"
storage "github.com/01org/ciao/ciao-storage"
"github.com/01org/ciao/openstack/compute"
"github.com/01org/ciao/osprepare"
"github.com/01org/ciao/ssntp"
"github.com/01org/ciao/testutil"
Expand All @@ -55,7 +56,7 @@ var serverURL = flag.String("url", "", "Server URL")
var identityURL = "identity:35357"
var serviceUser = "csr"
var servicePassword = ""
var computeAPIPort = 8774
var computeAPIPort = compute.APIPort
var httpsCAcert = "/etc/pki/ciao/ciao-controller-cacert.pem"
var httpsKey = "/etc/pki/ciao/ciao-controller-key.pem"
var tablesInitPath = flag.String("tables_init_path", "./tables", "path to csv files")
Expand Down
4 changes: 2 additions & 2 deletions ciao-controller/openstack_compute.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ func (c *controller) ShowFlavorDetails(tenant string, flavorID string) (compute.
// then wrap them in keystone validation. It will then start the https
// service.
func (c *controller) startComputeService() error {
config := compute.APIConfig{Port: compute.APIPort, ComputeService: c}
config := compute.APIConfig{Port: computeAPIPort, ComputeService: c}

r := compute.Routes(config)
if r == nil {
Expand Down Expand Up @@ -344,7 +344,7 @@ func (c *controller) startComputeService() error {
}

// start service.
service := fmt.Sprintf(":%d", compute.APIPort)
service := fmt.Sprintf(":%d", computeAPIPort)

return http.ListenAndServeTLS(service, httpsCAcert, httpsKey, r)
}

0 comments on commit 37625c2

Please sign in to comment.