Exemple #1
0
        public void UpdateApplicationBits(string projectPath, Guid applicationId)
        {
            var provider = new ApplicationProvider(_credentialManager);

            provider.UploadApplication(projectPath, applicationId);
            provider.RestartApplication(applicationId);
        }
Exemple #2
0
        public IEnumerable <Crashlog> GetApplicationCrashlogs(Guid applicationId)
        {
            var provider = new ApplicationProvider(_credentialManager);

            return(provider.GetCrashlogs(applicationId));

            //TODO: Need to send request ~apps/guid/instances/guid/files/logs (strange mistake)
        }
Exemple #3
0
        public string GetApplicationLogs(Guid applicationId)
        {
            var provider = new ApplicationProvider(_credentialManager);

            provider.GetInstances(applicationId);

            //TODO: Need to send request ~apps/guid/instances/guid/files/logs (strange mistake)

            return(string.Empty);
        }
Exemple #4
0
        public void PushApplication(string name, Guid stackId, Guid spaceId, long memory, int numerInstance, string projectPath, string subDomain, string domain)
        {
            Resource <Route> resourceRoute = null;

            if (!string.IsNullOrWhiteSpace(domain) && !string.IsNullOrWhiteSpace(subDomain))
            {
                var bindDomain = GetDomainByName(spaceId, domain);
                resourceRoute = GetRouteByHostName(subDomain) ?? CreateRoute(subDomain, bindDomain.Metadata.ObjectId, spaceId);
            }

            var provider = new ApplicationProvider(_credentialManager, _stableDataStorage);
            var resource = provider.PushApplication(name, stackId, spaceId, memory, numerInstance, projectPath);

            if (resourceRoute != null)
            {
                provider.BindRouteApplication(resource.Metadata.ObjectId, resourceRoute.Metadata.ObjectId);
            }
        }
Exemple #5
0
        public IEnumerable <Resource <ApplicationEvent> > GetApplicationEvents(Application application)
        {
            var provider = new ApplicationProvider(_credentialManager);

            return(provider.GetEvents(application));
        }
Exemple #6
0
        public IEnumerable <InstanceDetail> GetInstances(Guid applicationId)
        {
            var provider = new ApplicationProvider(_credentialManager);

            return(provider.GetInstances(applicationId));
        }
Exemple #7
0
        public IEnumerable <StatInfo> GetStats(Guid applicationId)
        {
            var provider = new ApplicationProvider(_credentialManager);

            return(provider.GetStats(applicationId));
        }
Exemple #8
0
        public IEnumerable <Resource <Application> > GetApplications()
        {
            var provider = new ApplicationProvider(_credentialManager);

            return(provider.GetAll());
        }
Exemple #9
0
        public Resource <Application> UnsetApplicationEnvironmentVariables(Guid applicationId, string keyVariable)
        {
            var provider = new ApplicationProvider(_credentialManager);

            return(provider.UnsetApplicationEnvironmentVariables(applicationId, keyVariable));
        }
Exemple #10
0
        public void DeleteApplication(Guid applicationId)
        {
            var provider = new ApplicationProvider(_credentialManager);

            provider.Delete(applicationId);
        }
Exemple #11
0
        public Resource <Application> UpdateApplication(Resource <Application> resource)
        {
            var provider = new ApplicationProvider(_credentialManager);

            return(provider.Update(resource));
        }
Exemple #12
0
        public Resource <Application> CreateApplication(string name, Guid stackId, Guid spaceId, long memory, int numerInstance)
        {
            var provider = new ApplicationProvider(_credentialManager, _stableDataStorage);

            return(provider.Create(name, stackId, spaceId, memory, numerInstance));
        }
Exemple #13
0
        public Resource <Application> GetApplication(string applicationName)
        {
            var provider = new ApplicationProvider(_credentialManager);

            return(provider.GetByParam(Constants.ParamName, applicationName));
        }
Exemple #14
0
        public Resource <Application> GetApplication(Guid applicationId)
        {
            var provider = new ApplicationProvider(_credentialManager);

            return(provider.GetById(applicationId));
        }
Exemple #15
0
        public string GetApplicationEnvironmentVariables(Guid applicationId)
        {
            var provider = new ApplicationProvider(_credentialManager);

            return(provider.GetApplicationEnvironmentVariables(applicationId));
        }
Exemple #16
0
        public void RestartApplication(Guid applicationId)
        {
            var provider = new ApplicationProvider(_credentialManager);

            provider.RestartApplication(applicationId);
        }
Exemple #17
0
        public Resource <Application> SetApplicationEnvironmentVariables(Guid applicationId, KeyValuePair <string, string> variable)
        {
            var provider = new ApplicationProvider(_credentialManager);

            return(provider.SetApplicationEnvironmentVariables(applicationId, variable));
        }
Exemple #18
0
        public Stream DownloadApplication(Guid applicationId)
        {
            var provider = new ApplicationProvider(_credentialManager);

            return(provider.Download(applicationId));
        }
Exemple #19
0
        public void UnbindRouteApplication(Guid applicationId, Guid routeId)
        {
            var provider = new ApplicationProvider(_credentialManager);

            provider.UnbindRouteApplication(applicationId, routeId);
        }
Exemple #20
0
        public IEnumerable <Resource <Application> > GetApplicationsBySpace(Space space)
        {
            var provider = new ApplicationProvider(_credentialManager);

            return(provider.GetApplicationsBySpace(space));
        }