コード例 #1
0
        public void TC001_TestConfig()
        {
            CloudFoundrySection cfSection = (CloudFoundrySection)ConfigurationManager.GetSection("cloudfoundry");

            if (!File.Exists("cfTest.config"))
            {
                Assert.Fail();
            }
            Assert.AreEqual("c:\\droplets", cfSection.DEA.BaseDir);
        }
コード例 #2
0
        public VCAPComponent()
        {
            this.VarzLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
            this.Varz     = new Dictionary <string, object>();
            this.Discover = new Dictionary <string, object>();

            this.ConstructReactor();

            this.UUID = Guid.NewGuid().ToString("N");

            CloudFoundrySection cfSection = (CloudFoundrySection)ConfigurationManager.GetSection("cloudfoundry");

            this.Host       = NetworkInterface.GetLocalIPAddress(cfSection.DEA.LocalRoute);
            VCAPReactor.Uri = new Uri(cfSection.DEA.MessageBus);

            // http server port
            this.Port = NetworkInterface.GrabEphemeralPort();

            this.Authentication = new string[] { Credentials.GenerateCredential(32), Credentials.GenerateCredential(32) };
        }
コード例 #3
0
        /// <summary>
        /// Gets the DEA config element.
        /// </summary>
        /// <returns>A DEAElement that contains all DEA configuration settings, including the Directory Server.</returns>
        public static DEAElement ReadConfig()
        {
            CloudFoundrySection cfSection = (CloudFoundrySection)ConfigurationManager.GetSection("cloudfoundry");

            return(cfSection.DEA);
        }