[Notes] [Git][BuildGrid/buildgrid][jmac/expand-user-for-tls] 2 commits: Add !path tag which informs parser to expand input.



Title: GitLab

finn pushed to branch jmac/expand-user-for-tls at BuildGrid / buildgrid

Commits:

4 changed files:

Changes:

  • buildgrid/_app/settings/cas.yml
    ... ... @@ -17,7 +17,7 @@ instances:
    17 17
     
    
    18 18
         storages:
    
    19 19
             - !disk-storage &main-storage
    
    20
    -          path: ~/cas/
    
    20
    +          path: !path ~/cas/
    
    21 21
     
    
    22 22
         services:
    
    23 23
           - !cas
    

  • buildgrid/_app/settings/default.yml
    ... ... @@ -17,7 +17,7 @@ instances:
    17 17
     
    
    18 18
         storages:
    
    19 19
             - !disk-storage &main-storage
    
    20
    -          path: ~/cas/
    
    20
    +          path: !path ~/cas/
    
    21 21
     
    
    22 22
         services:
    
    23 23
           - !action-cache &main-action
    

  • buildgrid/_app/settings/parser.py
    ... ... @@ -68,12 +68,20 @@ class Channel(YamlFactory):
    68 68
                     sys.exit(-1)
    
    69 69
     
    
    70 70
     
    
    71
    +class Path(YamlFactory):
    
    72
    +
    
    73
    +    yaml_tag = u'!path'
    
    74
    +
    
    75
    +    def __new__(cls, path):
    
    76
    +        path = os.path.expanduser(path)
    
    77
    +        return path
    
    78
    +
    
    79
    +
    
    71 80
     class Disk(YamlFactory):
    
    72 81
     
    
    73 82
         yaml_tag = u'!disk-storage'
    
    74 83
     
    
    75 84
         def __new__(cls, path):
    
    76
    -        path = os.path.expanduser(path)
    
    77 85
             return DiskStorage(path)
    
    78 86
     
    
    79 87
     
    
    ... ... @@ -197,6 +205,7 @@ def _parse_size(size):
    197 205
     def get_parser():
    
    198 206
     
    
    199 207
         yaml.SafeLoader.add_constructor(Channel.yaml_tag, Channel.from_yaml)
    
    208
    +    yaml.SafeLoader.add_constructor(Path.yaml_tag, Path.from_yaml)
    
    200 209
         yaml.SafeLoader.add_constructor(Execution.yaml_tag, Execution.from_yaml)
    
    201 210
         yaml.SafeLoader.add_constructor(Action.yaml_tag, Action.from_yaml)
    
    202 211
         yaml.SafeLoader.add_constructor(Reference.yaml_tag, Reference.from_yaml)
    

  • buildgrid/_app/settings/remote-storage.yml
    ... ... @@ -19,10 +19,10 @@ instances:
    19 19
             - !remote-storage &main-storage
    
    20 20
               url: "http://localhost:50052"
    
    21 21
               instance_name: main
    
    22
    -          credentials:
    
    23
    -            tls-client-key: null
    
    24
    -            tls-client-cert: null
    
    25
    -            tls-server-cert: null
    
    22
    +#          credentials:
    
    23
    +#            tls-client-key: null
    
    24
    +#            tls-client-cert: null
    
    25
    +#            tls-server-cert: null
    
    26 26
     
    
    27 27
         services:
    
    28 28
           - !action-cache &main-action
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]