source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
Rakefile
Ruby
apache-2.0
203
main
1,355
ENV['SINATRA_ACTIVESUPPORT_WARNING'] = 'false' if ENV['DB'] == 'postgresql' warn('Resetting env var DB from postgresql to postgres...') ENV['DB'] = 'postgres' end require File.expand_path('config/boot', __dir__) require 'yaml' require 'sequel' require 'steno/steno' require 'cloud_controller' require_relative 'li...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
Guardfile
Ruby
apache-2.0
203
main
729
# cc Guardfile # More info at https://github.com/guard/guard#readme guard 'rspec', cli: '--color --format doc --fail-fast', all_on_start: false, all_after_pass: false do watch(%r{^spec/.+_spec\.rb$}) watch('lib/cloud_controller/api/app.rb') { 'spec/api/legacy_apps_spec.rb' } watch(%r{^lib/(.+)\.rb$}) ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models.rb
Ruby
apache-2.0
203
main
7,732
require 'models/helpers/metadata_model_mixin' require 'models/runtime/space' require 'models/runtime/app_model' require 'models/runtime/build_model' require 'models/runtime/route_mapping_model' require 'models/runtime/package_model' require 'models/runtime/droplet_model' require 'models/runtime/buildpack_lifecycle_dat...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/collection_transformers/usernames_and_roles_populator.rb
Ruby
apache-2.0
203
main
2,469
module VCAP::CloudController class UsernamesAndRolesPopulator attr_reader :uaa_client def initialize(uaa_client) @uaa_client = uaa_client end def transform(users, opts={}) user_guids = users.map(&:guid) username_mapping = uaa_client.usernames_for_ids(user_guids) organization_...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/collection_transformers/router_group_type_populator.rb
Ruby
apache-2.0
203
main
703
module VCAP::CloudController class RouterGroupTypePopulator attr_reader :routing_api_client def initialize(routing_api_client) @routing_api_client = routing_api_client end def transform(domains, _opts={}) return domains unless routing_api_client.enabled? return domains if domains.s...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/collection_transformers/credhub_credential_populator.rb
Ruby
apache-2.0
203
main
921
module VCAP::CloudController class CredhubCredentialPopulator attr_reader :credhub_client def initialize(credhub_client) @credhub_client = credhub_client end def transform(service_keys, _opts={}) service_keys = Array(service_keys) service_keys.each do |service_key| service...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/collection_transformers/username_populator.rb
Ruby
apache-2.0
203
main
410
module VCAP::CloudController class UsernamePopulator attr_reader :uaa_client def initialize(uaa_client) @uaa_client = uaa_client end def transform(users, _opts={}) users = Array(users) user_ids = users.collect(&:guid) username_mapping = uaa_client.usernames_for_ids(user_ids) ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/timeout_job.rb
Ruby
apache-2.0
203
main
742
require 'jobs/wrapping_job' module VCAP::CloudController module Jobs class TimeoutJob < WrappingJob def initialize(job, timeout) super(job) @timeout = timeout end def perform Timeout.timeout @timeout do super end rescue Timeout::Error rai...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/logging_context_job.rb
Ruby
apache-2.0
203
main
2,145
require 'jobs/wrapping_job' require 'presenters/error_presenter' module VCAP::CloudController module Jobs class LoggingContextJob < WrappingJob attr_reader :request_id def initialize(handler, request_id) super(handler) @request_id = request_id end def perform wit...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/error_translator_job.rb
Ruby
apache-2.0
203
main
272
module VCAP::CloudController module Jobs class ErrorTranslatorJob < VCAP::CloudController::Jobs::WrappingJob def error(job, err) err = translate_error(err) super end def translate_error(err) err end end end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/space_apply_manifest_action_job.rb
Ruby
apache-2.0
203
main
2,273
module VCAP::CloudController module Jobs class SpaceApplyManifestActionJob < VCAP::CloudController::Jobs::CCJob def initialize(space, app_guid_message_hash, apply_manifest_action, user_audit_info) @space = space @app_guid_message_hash = app_guid_message_hash @apply_manifest_action = ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/generic_enqueuer.rb
Ruby
apache-2.0
203
main
537
module VCAP::CloudController module Jobs REDUCED_PRIORITY = 50 class GenericEnqueuer < Enqueuer def self.shared(priority: nil) stored_instance = Thread.current[:generic_enqueuer] return stored_instance if stored_instance && priority.nil? new_instance = new(queue: Jobs::Queues.g...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/enqueuer.rb
Ruby
apache-2.0
203
main
3,098
require 'clockwork' require 'cloud_controller/clock/job_timeout_calculator' require 'cloud_controller/job/job_priority_overwriter' require 'jobs/pollable_job_wrapper' require 'jobs/logging_context_job' require 'jobs/timeout_job' require 'securerandom' module VCAP::CloudController module Jobs class Enqueuer ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/queues.rb
Ruby
apache-2.0
203
main
337
module VCAP::CloudController module Jobs module Queues def self.local(config) if config.get(:name).blank? "cc-#{ENV.fetch('HOSTNAME', nil)}" else "cc-#{config.get(:name)}-#{config.get(:index)}" end end def self.generic 'cc-generic' end ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/reoccurring_job.rb
Ruby
apache-2.0
203
main
2,949
require 'jobs/cc_job' module VCAP::CloudController module Jobs class ReoccurringJob < VCAP::CloudController::Jobs::CCJob attr_reader :finished, :start_time, :retry_number def success(current_delayed_job) pollable_job = PollableJobModel.find_by_delayed_job(current_delayed_job) if fin...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/audit_event_job.rb
Ruby
apache-2.0
203
main
1,004
module VCAP::CloudController module Jobs class AuditEventJob < VCAP::CloudController::Jobs::CCJob attr_accessor :job, :event_repository, :event_creation_method, :event_type, :model_class, :model_guid, :params def initialize(job, event_repository, event_creation_method, event_type, model_class, model_...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/delete_action_job.rb
Ruby
apache-2.0
203
main
2,124
module VCAP::CloudController module Jobs class DeleteActionJob < VCAP::CloudController::Jobs::CCJob NO_ERRORS = [].freeze attr_reader :resource_guid, :resource_type def initialize(model_class, resource_guid, delete_action, resource_type=nil) @model_class = model_class @resou...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/wrapping_job.rb
Ruby
apache-2.0
203
main
1,903
require 'jobs/cc_job' module VCAP::CloudController module Jobs class WrappingJob < VCAP::CloudController::Jobs::CCJob attr_reader :handler def initialize(handler) @handler = handler end delegate :perform, to: :handler def after(job) handler.after(job) if handler.r...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/pollable_job_wrapper.rb
Ruby
apache-2.0
203
main
3,963
require 'presenters/error_presenter' require 'jobs/wrapping_job' require 'presenters/v3_error_hasher' module VCAP::CloudController module Jobs class PollableJobWrapper < WrappingJob attr_reader :existing_guid def initialize(handler, existing_guid: nil) @existing_guid = existing_guid ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/cc_job.rb
Ruby
apache-2.0
203
main
336
module VCAP::CloudController module Jobs class CCJob def before(delayed_job) GenericEnqueuer.shared(priority: delayed_job.priority) end def after(_delayed_job) GenericEnqueuer.reset! end def reschedule_at(time, attempts) time + (attempts**4) + 5 end ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/expired_blob_cleanup.rb
Ruby
apache-2.0
203
main
1,245
module VCAP::CloudController module Jobs module Runtime class ExpiredBlobCleanup < VCAP::CloudController::Jobs::CCJob def perform logger.info('Deleting package and droplet blobs that are expired or failed') DropletModel.where(state: [DropletModel::EXPIRED_STATE, DropletModel::FA...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/pending_droplet_cleanup.rb
Ruby
apache-2.0
203
main
1,448
module VCAP::CloudController module Jobs module Runtime class PendingDropletCleanup < VCAP::CloudController::Jobs::CCJob ADDITIONAL_EXPIRATION_TIME_IN_SECONDS = 300 attr_reader :expiration_in_seconds def initialize(expiration_in_seconds:) @expiration_in_seconds = expirati...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/events_cleanup.rb
Ruby
apache-2.0
203
main
537
module VCAP::CloudController module Jobs module Runtime class EventsCleanup < VCAP::CloudController::Jobs::CCJob attr_accessor :cutoff_age_in_days def initialize(cutoff_age_in_days) @cutoff_age_in_days = cutoff_age_in_days end def perform Database::OldRe...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/expired_resource_cleanup.rb
Ruby
apache-2.0
203
main
924
module VCAP::CloudController module Jobs module Runtime class ExpiredResourceCleanup < VCAP::CloudController::Jobs::CCJob def perform logger.info('Deleting expired droplet and package models') deleted_expired_droplets.each(&:destroy) deleted_expired_packages.each(&:dest...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/blobstore_delete.rb
Ruby
apache-2.0
203
main
1,140
module VCAP::CloudController module Jobs module Runtime class BlobstoreDelete < VCAP::CloudController::Jobs::CCJob attr_accessor :key, :blobstore_name, :attributes def initialize(key, blobstore_name, attributes=nil) @key = key @blobstore_name = blobstore_name @...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/buildpack_installer.rb
Ruby
apache-2.0
203
main
943
module VCAP::CloudController module Jobs module Runtime class BuildpackInstaller < VCAP::CloudController::Jobs::CCJob attr_accessor :name, :file, :options, :guid_to_upgrade, :stack_name, :action def initialize(job_options) @name = job_options[:name] @file = job_options[:...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/prune_completed_deployments.rb
Ruby
apache-2.0
203
main
1,613
module VCAP::CloudController module Jobs module Runtime class PruneCompletedDeployments < VCAP::CloudController::Jobs::CCJob attr_accessor :max_retained_deployments_per_app def initialize(max_retained_deployments_per_app) @max_retained_deployments_per_app = max_retained_deployment...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/expired_orphaned_blob_cleanup.rb
Ruby
apache-2.0
203
main
706
module VCAP::CloudController module Jobs module Runtime class ExpiredOrphanedBlobCleanup < VCAP::CloudController::Jobs::CCJob CUTOFF_AGE_IN_DAYS = 90 def perform old_orphaned_blobs = OrphanedBlob.where(Sequel.lit("created_at < CURRENT_TIMESTAMP - INTERVAL '?' DAY", CUTOFF_AGE_IN_D...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/model_deletion.rb
Ruby
apache-2.0
203
main
829
module VCAP::CloudController module Jobs module Runtime class ModelDeletion < VCAP::CloudController::Jobs::CCJob attr_accessor :model_class, :guid def initialize(model_class, guid) @model_class = model_class @guid = guid end def perform logger ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/update_buildpack_installer.rb
Ruby
apache-2.0
203
main
796
module VCAP::CloudController module Jobs module Runtime class UpdateBuildpackInstaller < BuildpackInstaller def perform logger.info "Updating buildpack name `#{name}' with stack `#{stack_name}'" buildpack = Buildpack.find(guid: guid_to_upgrade) if buildpack.locked ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/prune_completed_tasks.rb
Ruby
apache-2.0
203
main
1,651
require 'database/batch_delete' module VCAP::CloudController module Jobs module Runtime class PruneCompletedTasks < VCAP::CloudController::Jobs::CCJob attr_accessor :cutoff_age_in_days def initialize(cutoff_age_in_days) @cutoff_age_in_days = cutoff_age_in_days end ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/service_operations_initial_cleanup.rb
Ruby
apache-2.0
203
main
2,569
module VCAP::CloudController module Jobs module Runtime class ServiceOperationsInitialCleanup < VCAP::CloudController::Jobs::CCJob def perform cleanup_operations(ServiceInstanceOperation, ServiceInstance, :service_instance_id, :cleanup_failed_provision) cleanup_operations(Service...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/delete_expired_droplet_blob.rb
Ruby
apache-2.0
203
main
867
module VCAP::CloudController module Jobs module Runtime class DeleteExpiredDropletBlob < VCAP::CloudController::Jobs::CCJob attr_reader :droplet_guid def initialize(droplet_guid) @droplet_guid = droplet_guid end def perform logger.info("Deleting expired ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/buildpack_installer_factory.rb
Ruby
apache-2.0
203
main
6,569
module VCAP::CloudController module Jobs module Runtime class BuildpackInstallerFactory ## # Raised when attempting to install two buildpacks with the same name and stack class DuplicateInstallError < StandardError end ## # Raised when attempting to install a...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/legacy_jobs.rb
Ruby
apache-2.0
203
main
558
# It"s important to keep around old jobs names since there might be queued jobs with these older names # in a deployment out there. This is especially important for on-prem deployments that might not regularly # update CF. require 'jobs/runtime/blobstore_delete' require 'jobs/runtime/blobstore_upload' require 'jobs/ru...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/buildpack_cache_cleanup.rb
Ruby
apache-2.0
203
main
575
module VCAP::CloudController module Jobs module Runtime class BuildpackCacheCleanup < VCAP::CloudController::Jobs::CCJob def perform logger = Steno.logger('cc.background') logger.info('Attempting cleanup of buildpack_cache blobstore') blobstore = CloudController::Depen...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/delete_expired_package_blob.rb
Ruby
apache-2.0
203
main
1,055
require 'jobs/runtime/blobstore_delete' module VCAP::CloudController module Jobs module Runtime class DeleteExpiredPackageBlob < VCAP::CloudController::Jobs::CCJob attr_reader :package_guid def initialize(package_guid) @package_guid = package_guid end def perform...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/create_buildpack_installer.rb
Ruby
apache-2.0
203
main
1,254
module VCAP::CloudController module Jobs module Runtime class CreateBuildpackInstaller < BuildpackInstaller attr_accessor :config_index def initialize(job_options) super @config_index = job_options[:config_index] end def perform logger.info "In...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/pending_build_cleanup.rb
Ruby
apache-2.0
203
main
1,535
module VCAP::CloudController module Jobs module Runtime class PendingBuildCleanup < VCAP::CloudController::Jobs::CCJob ADDITIONAL_EXPIRATION_TIME_IN_SECONDS = 300 attr_reader :expiration_in_seconds def initialize(expiration_in_seconds:) @expiration_in_seconds = expiration...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/buildpack_delete.rb
Ruby
apache-2.0
203
main
634
module VCAP::CloudController module Jobs module Runtime class BuildpackDelete < VCAP::CloudController::Jobs::CCJob def initialize(guid:, timeout:) @guid = guid @timeout = timeout end def perform buildpack = nil buildpacks_lock = Locking[name: ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/orphaned_blobs_cleanup.rb
Ruby
apache-2.0
203
main
7,551
require 'cloud_controller/dependency_locator' require 'cloud_controller/clock/clock' require 'repositories/orphaned_blob_event_repository' module VCAP::CloudController module Jobs module Runtime class OrphanedBlobsCleanup < VCAP::CloudController::Jobs::CCJob DIRTY_THRESHOLD = 3 NUMBER_OF_BL...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/prune_excess_app_revisions.rb
Ruby
apache-2.0
203
main
1,307
module VCAP::CloudController module Jobs module Runtime class PruneExcessAppRevisions < VCAP::CloudController::Jobs::CCJob attr_accessor :max_retained_revisions_per_app def initialize(max_retained_revisions_per_app) @max_retained_revisions_per_app = max_retained_revisions_per_app ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/pollable_job_cleanup.rb
Ruby
apache-2.0
203
main
2,191
module VCAP::CloudController module Jobs module Runtime class PollableJobCleanup < VCAP::CloudController::Jobs::CCJob attr_accessor :cutoff_age_in_days def initialize(cutoff_age_in_days) @cutoff_age_in_days = cutoff_age_in_days end def perform logger = S...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/failed_jobs_cleanup.rb
Ruby
apache-2.0
203
main
2,540
module VCAP::CloudController module Jobs module Runtime class FailedJobsCleanup < VCAP::CloudController::Jobs::CCJob attr_accessor :cutoff_age_in_days, :max_number_of_failed_delayed_jobs def initialize(cutoff_age_in_days:, max_number_of_failed_delayed_jobs: nil) @cutoff_age_in_day...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/prune_completed_builds.rb
Ruby
apache-2.0
203
main
1,425
module VCAP::CloudController module Jobs module Runtime class PruneCompletedBuilds < VCAP::CloudController::Jobs::CCJob attr_accessor :max_retained_builds_per_app def initialize(max_retained_builds_per_app) @max_retained_builds_per_app = max_retained_builds_per_app end ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/blobstore_upload.rb
Ruby
apache-2.0
203
main
1,097
module VCAP::CloudController module Jobs module Runtime class BlobstoreUpload < VCAP::CloudController::Jobs::CCJob attr_reader :local_path, :blobstore_key, :blobstore_name, :max_attempts def initialize(local_path, blobstore_key, blobstore_name) @local_path = local_path @...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/runtime/app_usage_events_cleanup.rb
Ruby
apache-2.0
203
main
772
require 'repositories/app_usage_event_repository' module VCAP::CloudController module Jobs module Runtime class AppUsageEventsCleanup < VCAP::CloudController::Jobs::CCJob attr_accessor :cutoff_age_in_days def initialize(cutoff_age_in_days) @cutoff_age_in_days = cutoff_age_in_days...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v2/upload_droplet_from_user.rb
Ruby
apache-2.0
203
main
598
module VCAP::CloudController module Jobs module V2 class UploadDropletFromUser attr_reader :max_attempts def initialize(local_path, droplet_guid) @local_path = local_path @droplet_guid = droplet_guid @max_attempts = 3 end def perform ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v2/services/service_binding_state_fetch.rb
Ruby
apache-2.0
203
main
6,156
require_relative 'asynchronous_operations' module VCAP::CloudController module Jobs module Services class ServiceBindingStateFetch < VCAP::CloudController::Jobs::CCJob include AsynchronousOperations attr_accessor :service_binding_guid, :end_timestamp, :user_audit_info, :request_attrs, :pol...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v2/services/delete_orphaned_key.rb
Ruby
apache-2.0
203
main
1,253
module VCAP::CloudController module Jobs module Services class DeleteOrphanedKey < VCAP::CloudController::Jobs::CCJob attr_accessor :name, :key_guid, :service_instance_guid def initialize(name, key_guid, service_instance_guid) @name = name @key_guid = key_guid ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v2/services/service_usage_events_cleanup.rb
Ruby
apache-2.0
203
main
793
require 'repositories/service_usage_event_repository' module VCAP::CloudController module Jobs module Services class ServiceUsageEventsCleanup < VCAP::CloudController::Jobs::CCJob attr_accessor :cutoff_age_in_days def initialize(cutoff_age_in_days) @cutoff_age_in_days = cutoff_ag...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v2/services/asynchronous_operations.rb
Ruby
apache-2.0
203
main
1,662
module VCAP::CloudController module Jobs module Services module AsynchronousOperations private def new_end_timestamp max_poll_duration_configured = VCAP::CloudController::Config.config.get(:broker_client_max_async_poll_duration_minutes).minutes max_poll_duration_on_plan ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v2/services/service_instance_state_fetch.rb
Ruby
apache-2.0
203
main
3,855
require_relative 'asynchronous_operations' module VCAP::CloudController module Jobs module Services class ServiceInstanceStateFetch < VCAP::CloudController::Jobs::CCJob include AsynchronousOperations attr_accessor :name, :service_instance_guid, :request_attrs, :poll_interval, :end_timestam...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v2/services/delete_orphaned_binding.rb
Ruby
apache-2.0
203
main
2,159
module VCAP::CloudController module Jobs module Services class OrphanedBindingInfo attr_accessor :guid, :service_instance_guid def initialize(binding) @guid = binding.guid @service_instance_guid = binding.service_instance.guid @service_instance...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v2/services/delete_orphaned_instance.rb
Ruby
apache-2.0
203
main
1,361
module VCAP::CloudController module Jobs module Services class DeleteOrphanedInstance < VCAP::CloudController::Jobs::CCJob attr_accessor :name, :service_instance_guid, :service_plan_guid def initialize(name, service_instance_guid, service_plan_guid) @name = name @service...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/diego/sync.rb
Ruby
apache-2.0
203
main
1,466
require 'cloud_controller/diego/processes_sync' require 'cloud_controller/diego/tasks_sync' require 'statsd' module VCAP::CloudController module Jobs module Diego class Sync < VCAP::CloudController::Jobs::CCJob def initialize(statsd=CloudController::DependencyLocator.instance.statsd_client) ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/buildpack_cache_delete.rb
Ruby
apache-2.0
203
main
881
module VCAP::CloudController module Jobs module V3 class BuildpackCacheDelete < VCAP::CloudController::Jobs::CCJob attr_accessor :resource_type, :resource_guid def initialize(app_guid) @resource_guid = app_guid end def perform logger = Steno.logger('cc.b...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/buildpack_cache_cleanup.rb
Ruby
apache-2.0
203
main
752
module VCAP::CloudController module Jobs module V3 class BuildpackCacheCleanup < VCAP::CloudController::Jobs::CCJob def perform logger = Steno.logger('cc.background') logger.info('Attempting cleanup of buildpack_cache blobstore') blobstore = CloudController::Dependency...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/create_binding_async_job.rb
Ruby
apache-2.0
203
main
3,930
require 'jobs/reoccurring_job' require 'actions/service_route_binding_create' require 'actions/service_credential_binding_app_create' require 'cloud_controller/errors/api_error' require 'jobs/v3/create_service_binding_job_factory' module VCAP::CloudController module V3 class CreateBindingAsyncJob < Jobs::Reoccur...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/buildpack_bits.rb
Ruby
apache-2.0
203
main
1,626
require 'cloud_controller/upload_buildpack' require 'repositories/buildpack_event_repository' module VCAP::CloudController module Jobs module V3 class BuildpackBits attr_reader :buildpack_guid alias_method :resource_guid, :buildpack_guid def initialize(buildpack_guid, buildpack_bit...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/delete_service_credential_binding_job_actor.rb
Ruby
apache-2.0
203
main
342
module VCAP::CloudController module V3 class DeleteServiceCredentialBindingJobActor def display_name 'service_bindings.delete' end def resource_type 'service_credential_binding' end def get_resource(resource_id) ServiceBinding.first(guid: resource_id) ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/delete_service_key_binding_job_actor.rb
Ruby
apache-2.0
203
main
327
module VCAP::CloudController module V3 class DeleteServiceKeyBindingJobActor def display_name 'service_keys.delete' end def resource_type 'service_credential_binding' end def get_resource(resource_id) ServiceKey.first(guid: resource_id) end end e...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/delete_service_route_binding_job_actor.rb
Ruby
apache-2.0
203
main
412
require 'jobs/reoccurring_job' require 'cloud_controller/errors/api_error' module VCAP::CloudController module V3 class DeleteServiceRouteBindingJobActor def display_name 'service_route_bindings.delete' end def resource_type 'service_route_binding' end def get_reso...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/create_service_credential_binding_job_actor.rb
Ruby
apache-2.0
203
main
342
module VCAP::CloudController module V3 class CreateServiceCredentialBindingJobActor def display_name 'service_bindings.create' end def resource_type 'service_credential_binding' end def get_resource(resource_id) ServiceBinding.first(guid: resource_id) ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/package_bits.rb
Ruby
apache-2.0
203
main
758
require 'cloud_controller/packager/package_upload_handler' module VCAP::CloudController module Jobs module V3 class PackageBits def initialize(package_guid, package_zip_path, fingerprints) @package_guid = package_guid @package_zip_path = package_zip_path @fingerpri...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/create_service_instance_job.rb
Ruby
apache-2.0
203
main
4,632
require 'jobs/reoccurring_job' require 'actions/v3/service_instance_create_managed' module VCAP::CloudController module V3 class CreateServiceInstanceJob < VCAP::CloudController::Jobs::ReoccurringJob attr_reader :warnings def initialize( service_instance_guid, user_audit_info:, audit...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/create_service_route_binding_job_actor.rb
Ruby
apache-2.0
203
main
459
require 'jobs/reoccurring_job' require 'actions/service_route_binding_create' require 'cloud_controller/errors/api_error' module VCAP::CloudController module V3 class CreateServiceRouteBindingJobActor def display_name 'service_route_bindings.create' end def resource_type 'servi...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/droplet_upload.rb
Ruby
apache-2.0
203
main
1,936
module VCAP::CloudController module Jobs module V3 class DropletUpload attr_reader :max_attempts, :droplet_guid alias_method :resource_guid, :droplet_guid def initialize(local_path, droplet_guid, skip_state_transition:) @local_path = local_path @droplet_guid = ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/delete_service_binding_job_factory.rb
Ruby
apache-2.0
203
main
1,298
require 'jobs/v3/delete_service_route_binding_job_actor' require 'jobs/v3/delete_service_credential_binding_job_actor' require 'jobs/v3/delete_service_key_binding_job_actor' require 'actions/service_route_binding_delete' require 'actions/service_credential_binding_delete' module VCAP::CloudController module V3 c...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/buildpack_cache_upload.rb
Ruby
apache-2.0
203
main
1,348
module VCAP::CloudController module Jobs module V3 class BuildpackCacheUpload attr_reader :max_attempts def initialize(local_path:, app_guid:, stack_name:) @local_path = local_path @app_guid = app_guid @stack_name = stack_name @max_attempts = ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/create_service_binding_job_factory.rb
Ruby
apache-2.0
203
main
1,235
require 'jobs/v3/create_service_route_binding_job_actor' require 'jobs/v3/create_service_credential_binding_job_actor' require 'jobs/v3/create_service_key_binding_job_actor' require 'actions/service_credential_binding_app_create' require 'actions/service_credential_binding_key_create' require 'actions/service_route_bin...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/space_delete_unmapped_routes_job.rb
Ruby
apache-2.0
203
main
557
module VCAP::CloudController module Jobs module V3 class SpaceDeleteUnmappedRoutesJob attr_reader :space_guid alias_method :resource_guid, :space_guid def initialize(space) @space = space @space_guid = space.guid end def perform VCAP::C...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/droplet_bits_copier.rb
Ruby
apache-2.0
203
main
2,002
module VCAP::CloudController module Jobs module V3 class DropletBitsCopier < VCAP::CloudController::Jobs::CCJob def initialize(src_droplet_guid, dest_droplet_guid) @src_droplet_guid = src_droplet_guid @dest_droplet_guid = dest_droplet_guid end def perform ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/create_service_key_binding_job_actor.rb
Ruby
apache-2.0
203
main
327
module VCAP::CloudController module V3 class CreateServiceKeyBindingJobActor def display_name 'service_keys.create' end def resource_type 'service_credential_binding' end def get_resource(resource_id) ServiceKey.first(guid: resource_id) end end e...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/update_service_instance_job.rb
Ruby
apache-2.0
203
main
4,322
require 'jobs/reoccurring_job' require 'actions/v3/service_instance_update_managed' module VCAP::CloudController module V3 class UpdateServiceInstanceJob < VCAP::CloudController::Jobs::ReoccurringJob attr_reader :warnings def initialize( service_instance_guid, message:, user_...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/delete_service_instance_job.rb
Ruby
apache-2.0
203
main
1,998
require 'services/service_brokers/v2/errors/service_broker_bad_response' require 'jobs/reoccurring_job' require 'actions/v3/service_instance_delete' module VCAP::CloudController module V3 class DeleteServiceInstanceJob < VCAP::CloudController::Jobs::ReoccurringJob attr_reader :resource_guid def init...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/delete_binding_job.rb
Ruby
apache-2.0
203
main
2,563
require 'jobs/reoccurring_job' require 'cloud_controller/errors/api_error' require 'actions/service_route_binding_delete' require 'jobs/v3/delete_service_binding_job_factory' module VCAP::CloudController module V3 class DeleteBindingJob < Jobs::ReoccurringJob def initialize(type, binding_guid, user_audit_i...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/package_bits_copier.rb
Ruby
apache-2.0
203
main
1,392
module VCAP::CloudController module Jobs module V3 class PackageBitsCopier < VCAP::CloudController::Jobs::CCJob def initialize(src_package_guid, dest_package_guid) @src_package_guid = src_package_guid @dest_package_guid = dest_package_guid end def perform ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/services/service_broker_catalog_updater.rb
Ruby
apache-2.0
203
main
2,684
module VCAP::CloudController module V3 class ServiceBrokerCatalogUpdater attr_reader :warnings def initialize(broker, user_audit_info:) @broker = broker @formatter = VCAP::Services::ServiceBrokers::ValidationErrorsFormatter.new @service_event_repository = VCAP::CloudController...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/services/update_broker_job.rb
Ruby
apache-2.0
203
main
4,282
require 'presenters/mixins/metadata_presentation_helpers' require 'jobs/cc_job' module VCAP::CloudController module V3 class UpdateBrokerJob < VCAP::CloudController::Jobs::CCJob attr_reader :warnings def initialize(update_request_guid, broker_guid, previous_broker_state, user_audit_info:) @u...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/jobs/v3/services/synchronize_broker_catalog_job.rb
Ruby
apache-2.0
203
main
2,112
require 'jobs/v3/services/service_broker_catalog_updater' module VCAP::CloudController module V3 class SynchronizeBrokerCatalogJob < VCAP::CloudController::Jobs::CCJob attr_reader :warnings def initialize(broker_guid, user_audit_info:) @broker_guid = broker_guid @user_audit_info = us...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/droplet_fetcher.rb
Ruby
apache-2.0
203
main
224
module VCAP::CloudController class DropletFetcher def fetch(droplet_guid) droplet = DropletModel.where(guid: droplet_guid).first return nil if droplet.nil? [droplet, droplet.space] end end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/assign_current_droplet_fetcher.rb
Ruby
apache-2.0
203
main
299
module VCAP::CloudController class AssignCurrentDropletFetcher def fetch(app_guid, droplet_guid) app = AppModel.where(guid: app_guid).first return nil if app.nil? droplet = app.droplets.detect { |d| d.guid == droplet_guid } [app, app.space, droplet] end end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/sidecar_list_fetcher.rb
Ruby
apache-2.0
203
main
587
require 'fetchers/base_list_fetcher' module VCAP::CloudController class SidecarListFetcher < BaseListFetcher class << self def fetch_for_app(message, app_guid) app, = AppFetcher.new.fetch(app_guid) [app, filter(message, app&.sidecars_dataset)] end def fetch_for_process(message,...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/service_plan_list_fetcher.rb
Ruby
apache-2.0
203
main
2,579
require 'fetchers/base_service_list_fetcher' module VCAP::CloudController class ServicePlanListFetcher < BaseServiceListFetcher class << self def fetch(message, omniscient: false, readable_orgs_query: nil, readable_spaces_query: nil, eager_loaded_associations: []) super(ServicePlan, m...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/app_builds_list_fetcher.rb
Ruby
apache-2.0
203
main
826
require 'fetchers/base_list_fetcher' module VCAP::CloudController class AppBuildsListFetcher < BaseListFetcher class << self def fetch_all(app_guid, message) dataset = BuildModel.dataset.where(app_guid:) filter(message, dataset) end private def filter(message, dataset) ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/package_list_fetcher.rb
Ruby
apache-2.0
203
main
2,334
require 'fetchers/base_list_fetcher' module VCAP::CloudController class PackageListFetcher < BaseListFetcher class << self def fetch_all(message:) filter(message, joined_dataset) end def fetch_for_spaces(message:, space_guids:) dataset = joined_dataset.where(table_column_name(A...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/isolation_segment_spaces_fetcher.rb
Ruby
apache-2.0
203
main
361
module VCAP::CloudController class IsolationSegmentSpacesFetcher def initialize(isolation_segment) @isolation_segment = isolation_segment end def fetch_all @isolation_segment.spaces end def fetch_for_spaces(space_guids:) Space.where(guid: space_guids, isolation_segment_model: @...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/service_instance_list_fetcher.rb
Ruby
apache-2.0
203
main
4,719
require 'fetchers/base_list_fetcher' require 'fetchers/label_selector_query_generator' module VCAP::CloudController class ServiceInstanceListFetcher < BaseListFetcher class << self def fetch(message, omniscient: false, readable_spaces_dataset: nil, eager_loaded_associations: []) dataset = ServiceIn...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/buildpack_lifecycle_fetcher.rb
Ruby
apache-2.0
203
main
925
require 'cloud_controller/diego/lifecycles/lifecycles' module VCAP::CloudController class BuildpackLifecycleFetcher class << self def fetch(buildpack_names, stack_name, lifecycle=Config.config.get(:default_app_lifecycle)) { stack: Stack.find(name: stack_name), buildpack_infos: o...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/label_selector_query_generator.rb
Ruby
apache-2.0
203
main
1,508
module VCAP::CloudController class LabelSelectorQueryGenerator class << self def add_selector_queries(label_klass:, resource_dataset:, requirements:, resource_klass:) resource_guid = Sequel.qualify(resource_klass.table_name, :guid) requirements.each do |requirement| case requiremen...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/domain_fetcher.rb
Ruby
apache-2.0
203
main
1,896
require 'fetchers/base_list_fetcher' module VCAP::CloudController class DomainFetcher < BaseListFetcher class << self def fetch_all_for_orgs(readable_org_guids) # Q: The "Domain" in Domain.dataset is arbitrary -- just a way to get access to any database table. # If there's a way to use a mo...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/process_list_fetcher.rb
Ruby
apache-2.0
203
main
1,871
require 'fetchers/base_list_fetcher' module VCAP::CloudController class ProcessListFetcher < BaseListFetcher class << self def fetch_all(message, eager_loaded_associations: []) filter(message, process_dataset(eager_loaded_associations)) end def fetch_for_spaces(message, space_guids:, e...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/service_plan_visibility_fetcher.rb
Ruby
apache-2.0
203
main
954
module VCAP::CloudController class ServicePlanVisibilityFetcher def initialize(permission_queryer) @permission_queryer = permission_queryer end def fetch_orgs(service_plan_guids:) base_query(service_plan_guids:). select_all(:organizations). distinct(:organizations__id). ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/service_credential_binding_fetcher.rb
Ruby
apache-2.0
203
main
374
require 'fetchers/service_credential_binding_list_fetcher' module VCAP module CloudController class ServiceCredentialBindingFetcher def fetch(guid, readable_spaces_query: nil) list_fetcher.fetch(readable_spaces_query:).first(guid:) end private def list_fetcher ServiceCre...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/space_user_roles_fetcher.rb
Ruby
apache-2.0
203
main
243
module VCAP::CloudController class SpaceUserRolesFetcher def fetch(space) space.developers_dataset. union(space.managers_dataset, from_self: false). union(space.auditors_dataset, from_self: false) end end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/isolation_segment_list_fetcher.rb
Ruby
apache-2.0
203
main
1,579
require 'fetchers/base_list_fetcher' module VCAP::CloudController class IsolationSegmentListFetcher < BaseListFetcher class << self def fetch_all(message) dataset = IsolationSegmentModel.dataset filter(message, dataset) end def fetch_for_organizations(message, org_guids_query:)...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/service_offering_list_fetcher.rb
Ruby
apache-2.0
203
main
1,898
require 'fetchers/base_service_list_fetcher' module VCAP::CloudController class ServiceOfferingListFetcher < BaseServiceListFetcher class << self def fetch(message, omniscient: false, readable_orgs_query: nil, readable_spaces_query: nil, eager_loaded_associations: []) super(Service, m...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/organization_quota_list_fetcher.rb
Ruby
apache-2.0
203
main
1,171
require 'cloud_controller/paging/sequel_paginator' require 'cloud_controller/paging/paginated_result' require 'fetchers/base_list_fetcher' module VCAP::CloudController class OrganizationQuotaListFetcher < BaseListFetcher class << self def fetch(message:, readable_org_guids_query:) dataset = QuotaDe...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/fetchers/service_instance_fetcher.rb
Ruby
apache-2.0
203
main
405
module VCAP::CloudController class ServiceInstanceFetcher def fetch(guid) instance = ServiceInstance.first(guid:) return [nil, nil] unless instance if instance.managed_instance? plan = instance.service_plan service = plan.service end [instance, { space: ins...