Ejemplo n.º 1
0
        public void UpdateApplicationBits(string projectPath, Guid applicationId)
        {
            var provider = new ApplicationProvider(_credentialManager);

            provider.UploadApplication(projectPath, applicationId);
            provider.RestartApplication(applicationId);
        }
Ejemplo n.º 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)
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 5
0
        public IEnumerable <Resource <ApplicationEvent> > GetApplicationEvents(Application application)
        {
            var provider = new ApplicationProvider(_credentialManager);

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

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

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

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

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

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

            return(provider.Update(resource));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 13
0
        public Resource <Application> GetApplication(string applicationName)
        {
            var provider = new ApplicationProvider(_credentialManager);

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

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

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

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

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

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

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

            return(provider.GetApplicationsBySpace(space));
        }