// Copyright 2014, Renasar Technologies Inc.
/* jshint: node:true */

'use strict';

var di = require('di');

module.exports = constantsFactory;

di.annotate(constantsFactory, new di.Provide('Constants'));
di.annotate(constantsFactory,
    new di.Inject(
    )
);

function constantsFactory () {
    var constants = Object.freeze({
        WorkingDirectory: process.cwd(),
        Logging: {
            Colors: {
              emerg: 'red',
              alert: 'yellow',
              crit: 'red',
              error: 'red',
              warning: 'red',
              notice: 'yellow',
              info: 'green',
              debug: 'blue',
              silly: 'blue'
            },
            Levels: {
                emerg: 8,
                alert: 7,
                crit: 6,
                error: 5,
                warning: 4,
                notice: 3,
                info: 2,
                debug: 1,
                silly: 0
            },
            Context: {
                Length: 6
            },
            Sanitizations: ['id', 'mac', 'ip'],
            Redactions: [ 'password' ]
        },
        Configuration: {
            Files: {
                Default: process.cwd() + '/config.json',
                Overrides: process.cwd() + '/overrides.json'
            }
        },
        WorkItems: {
            Pollers: {
                IPMI: 'Pollers.IPMI',
                SNMP: 'Pollers.SNMP'
            }
        },
        Protocol: {
            Exchanges: {
                Configuration: {
                    Name: 'on.configuration',
                    Options: {
                        type: 'topic',
                        durable: true,
                        autoDelete: false
                    }
                },
                Dhcp: {
                    Name: 'on.dhcp',
                    Options: {
                        type: 'topic',
                        durable: true,
                        autoDelete: false
                    }
                },
                Events: {
                    Name: 'on.events',
                    Options: {
                        type: 'topic',
                        durable: true,
                        autoDelete: false
                    }
                },
                Http: {
                    Name: 'on.http',
                    Options: {
                        type: 'topic',
                        durable: true,
                        autoDelete: false
                    }
                },
                Logging: {
                    Name: 'on.logging',
                    Options: {
                        type: 'topic',
                        durable: true,
                        autoDelete: false
                    }
                },
                TaskGraphRunner: {
                    Name: 'on.task-graph-runner',
                    Options: {
                        type: 'topic',
                        durable: true,
                        autoDelete: false
                    }
                },
                Scheduler: {
                    Name: 'on.scheduler',
                    Options: {
                        type: 'topic',
                        durable: true,
                        autoDelete: false
                    }
                },
                Task: {
                    Name: 'on.task',
                    Options: {
                        type: 'topic',
                        durable: true,
                        autoDelete: false
                    }
                },
                Tftp: {
                    Name: 'on.tftp',
                    Options: {
                        type: 'topic',
                        durable: true,
                        autoDelete: false
                    }
                },
                Waterline: {
                    Name: 'on.waterline',
                    Options: {
                        type: 'topic',
                        durable: true,
                        autoDelete: false
                    }
                },
                Test: {
                    Name: 'on.test',
                    Options: {
                        type: 'topic',
                        durable: true,
                        autoDelete: false
                    }
                }
            }
        },
        Profiles: {
            Directory: process.cwd() + '/data/profiles'
        },
        Templates: {
            Directory: process.cwd() + '/data/templates'
        },
        TaskStates: {
            RUNNING: 'running',
            SUCCEEDED: 'succeeded',
            FAILED: 'failed',
            CANCELLED: 'cancelled',
            TIMEOUT: 'timeout',
            PENDING: 'pending'
        }
    });

    return constants;
}

@@ -4589,14 +4589,14 @@
    R
-UNNING
+unning
 : 'r
@@ -4621,16 +4621,16 @@
    S
-UCCEEDED
+ucceeded
 : 's
@@ -4657,13 +4657,13 @@
    F
-AILED
+ailed
 : 'f
@@ -4687,16 +4687,16 @@
    C
-ANCELLED
+ancelled
 : 'c
@@ -4723,14 +4723,14 @@
    T
-IMEOUT
+imeout
 : 't
@@ -4755,14 +4755,14 @@
    P
-ENDING
+ending
 : 'p

Update capitalization style for Constants.TaskStates