diff --git a/controller/idgen/id.go b/controller/idgen/id.go index 8c9e488f2..05777f01b 100644 --- a/controller/idgen/id.go +++ b/controller/idgen/id.go @@ -33,7 +33,6 @@ func New() string { type Generator interface { NextId() (string, error) - NextAlphaNumericPrefixedId() (string, error) } type shortIdGenerator struct { @@ -41,12 +40,8 @@ type shortIdGenerator struct { } func (self *shortIdGenerator) NextId() (string, error) { - return self.Generate() -} - -func (self *shortIdGenerator) NextAlphaNumericPrefixedId() (string, error) { for { - id, err := self.NextId() + id, err := self.Generate() if err != nil { return "", err } diff --git a/controller/network/network.go b/controller/network/network.go index c61193f15..de9549803 100644 --- a/controller/network/network.go +++ b/controller/network/network.go @@ -555,7 +555,7 @@ func (network *Network) CreateCircuit(params model.CreateCircuitParams) (*model. instanceId, serviceId := parseInstanceIdAndService(service) // 1: Allocate Circuit Identifier - circuitId, err := network.circuitIdGenerator.NextAlphaNumericPrefixedId() + circuitId, err := network.circuitIdGenerator.NextId() if err != nil { network.CircuitFailedEvent(circuitId, params, startTime, nil, nil, CircuitFailureIdGenerationError) return nil, err