Пример #1
0
        public void UpdateApplicationBits(string projectPath, Guid applicationId)
        {
            var provider = new ApplicationProvider(_credentialManager);

            provider.UploadApplication(projectPath, applicationId);
            provider.RestartApplication(applicationId);
        }
Пример #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)
        }
Пример #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);
        }
Пример #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);
            }
        }
Пример #5
0
        public IEnumerable <Resource <ApplicationEvent> > GetApplicationEvents(Application application)
        {
            var provider = new ApplicationProvider(_credentialManager);

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

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

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

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

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

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

            return(provider.Update(resource));
        }
Пример #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));
        }
Пример #13
0
        public Resource <Application> GetApplication(string applicationName)
        {
            var provider = new ApplicationProvider(_credentialManager);

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

            return(provider.GetById(applicationId));
        }
Пример #15
0
        public string GetApplicationEnvironmentVariables(Guid applicationId)
        {
            var provider = new ApplicationProvider(_credentialManager);

            return(provider.GetApplicationEnvironmentVariables(applicationId));
        }
Пример #16
0
        public void RestartApplication(Guid applicationId)
        {
            var provider = new ApplicationProvider(_credentialManager);

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

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

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

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

            return(provider.GetApplicationsBySpace(space));
        }