~themue/juju-core/050-prepare-openstack

« back to all changes in this revision

Viewing changes to names/constants.go

  • Committer: Dimiter Naydenov
  • Date: 2013-07-29 15:15:41 UTC
  • mto: This revision was merged to the branch mainline in revision 1565.
  • Revision ID: dimiter.naydenov@canonical.com-20130729151541-zm8murwo9u7mtsdu
names: new package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2013 Canonical Ltd.
 
2
// Licensed under the AGPLv3, see LICENCE file for details.
 
3
 
 
4
package names
 
5
 
 
6
const (
 
7
        UnitTagPrefix    = "unit-"
 
8
        MachineTagPrefix = "machine-"
 
9
        ServiceTagPrefix = "service-"
 
10
        EnvironTagPrefix = "environment-"
 
11
        UserTagPrefix    = "user-"
 
12
 
 
13
        ServiceSnippet       = "[a-z][a-z0-9]*(-[a-z0-9]*[a-z][a-z0-9]*)*"
 
14
        NumberSnippet        = "(0|[1-9][0-9]*)"
 
15
        ContainerSnippet     = "(/[a-z]+/" + NumberSnippet + ")"
 
16
        MachineSnippet       = NumberSnippet + ContainerSnippet + "*"
 
17
        ContainerSpecSnippet = "(([a-z])*:)?"
 
18
)