Comment 6 for bug 1251232

Revision history for this message
Przemyslaw Kaminski (pkaminski) wrote :

Here are the relevant regexpes in openstack.yaml:

    attributes_metadata:
      editable:
        access:
          metadata:
            label: "Access"
            weight: 10
          user:
            value: "admin"
            label: "username"
            description: "Username for Administrator"
            weight: 10
            type: "text"
            regex:
              source: &user_tenant_blacklist '^(?!services$)(?!nova$)(?!glance$)(?!keystone$)(?!neutron$)(?!cinder$)(?!swift$)(?!ceph$)(?![Gg]uest$)(?!.* +.*$).+'
              error: "Invalid username"
          email:
            value: "admin@localhost"
            label: "email"
            description: "Email address for Administrator"
            weight: 40
            type: "text"
            regex:
              source: ^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.?)+[a-z0-9]?(?:[a-z0-9-]*[a-z0-9])?
              error: "Invalid email"
          tenant:
            value: "admin"
            label: "tenant"
            description: "Tenant (project) name for Administrator"
            weight: 30
            type: "text"
            regex:
              source: *user_tenant_blacklist
              error: "Invalid tenant name"
          password:
            value: "admin"
            label: "password"
            description: "Password for Administrator"
            weight: 20
            type: "password"
            regex:
              source: .+
              error: "Invalid password"

I'd add a 'required' option so that we can replace those '.*'. This was tested as working against current master (35946b1f225c984f11915ba8e985584160f0b129) but since settings are being rewritten this bug is being postponed until https://blueprints.launchpad.net/openstack/?searchtext=backbone-to-react is finished.