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
app/controllers/runtime/events_controller.rb
Ruby
apache-2.0
203
main
658
require 'vcap/rest_api/event_query' module VCAP::CloudController class EventsController < RestController::ModelController query_parameters :timestamp, :type, :actee, :space_guid, :organization_guid sortable_parameters :timestamp, :id def initialize(*args) super @opts.merge!(order_by: %i[time...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/app_events_controller.rb
Ruby
apache-2.0
203
main
522
module VCAP::CloudController class AppEventsController < RestController::ModelController define_attributes do to_one :app attribute :instance_guid, String attribute :instance_index, Integer attribute :exit_status, Integer attribute :timestamp, String end deprecated_endpoint ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/space_summaries_controller.rb
Ruby
apache-2.0
203
main
2,578
module VCAP::CloudController class SpaceSummariesController < RestController::ModelController def self.dependencies [:instances_reporters] end path_base 'spaces' model_class_name :Space get "#{path_guid}/summary", :summary def summary(guid) space = find_guid_and_validate_access(...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/app_bits_upload_controller.rb
Ruby
apache-2.0
203
main
4,262
require 'presenters/api/job_presenter' require 'controllers/runtime/mixins/find_process_through_app' module VCAP::CloudController class AppBitsUploadController < RestController::ModelController include FindProcessThroughApp def self.dependencies [:app_event_repository] end def inject_dependen...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/private_domains_controller.rb
Ruby
apache-2.0
203
main
1,233
module VCAP::CloudController class PrivateDomainsController < RestController::ModelController define_attributes do attribute :name, String to_one :owning_organization to_many :shared_organizations, link_only: true, exclude_in: %i[create update], route_for: :get end query_parameters :nam...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/shared_domains_controller.rb
Ruby
apache-2.0
203
main
3,921
module VCAP::CloudController class SharedDomainsController < RestController::ModelController attr_reader :routing_api_client def self.dependencies %i[routing_api_client router_group_type_populating_collection_renderer] end define_attributes do attribute :name, String, exclude_in: :update...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/buildpack_bits_controller.rb
Ruby
apache-2.0
203
main
2,540
module VCAP::CloudController class BuildpackBitsController < RestController::ModelController def self.dependencies %i[buildpack_blobstore upload_handler] end path_base 'buildpacks' model_class_name :Buildpack allow_unauthenticated_access only: :download authenticate_basic_auth("#{path}/...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/root_controller.rb
Ruby
apache-2.0
203
main
2,743
require 'presenters/api_url_builder' module VCAP::CloudController class RootController < RestController::BaseController allow_unauthenticated_access get '/', :read def read api_url_builder = VCAP::CloudController::Presenters::ApiUrlBuilder response = { links: { self: { ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/space_quota_definitions_controller.rb
Ruby
apache-2.0
203
main
2,146
module VCAP::CloudController class SpaceQuotaDefinitionsController < RestController::ModelController define_attributes do attribute :name, String attribute :non_basic_services_allowed, Message::Boolean attribute :total_services, Integer attribute :total_se...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/stagings_controller.rb
Ruby
apache-2.0
203
main
6,595
require 'cloud_controller/blobstore/client' require 'presenters/api/staging_job_presenter' require 'utils/hash_utils' require 'actions/droplet_create' module VCAP::CloudController class StagingsController < RestController::BaseController def self.dependencies %i[droplet_blobstore buildpack_cache_blobstore ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/quota_definitions_controller.rb
Ruby
apache-2.0
203
main
1,796
module VCAP::CloudController class QuotaDefinitionsController < RestController::ModelController define_attributes do attribute :name, String attribute :non_basic_services_allowed, Message::Boolean attribute :total_services, Integer attribute :total_service...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/info_controller.rb
Ruby
apache-2.0
203
main
1,553
module VCAP::CloudController class InfoController < RestController::BaseController allow_unauthenticated_access get '/v2/info', :read def read info = { name: @config.get(:info, :name), build: @config.get(:info, :build), support: @config.get(:info, :support_address), ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/apps_controller.rb
Ruby
apache-2.0
203
main
19,664
require 'presenters/system_environment/system_env_presenter' require 'fetchers/queries/app_query' require 'actions/v2/app_stage' require 'actions/v2/app_create' require 'actions/v2/app_update' require 'actions/v2/route_mapping_create' require 'models/helpers/process_types' require 'controllers/runtime/mixins/find_proce...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/restages_controller.rb
Ruby
apache-2.0
203
main
2,818
require 'actions/v2/app_stage' require 'actions/staging_cancel' require 'controllers/runtime/mixins/find_process_through_app' module VCAP::CloudController class RestagesController < RestController::ModelController include FindProcessThroughApp def self.dependencies %i[app_event_repository stagers] ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/mixins/uaa_origin_validator.rb
Ruby
apache-2.0
203
main
730
module VCAP::CloudController module UaaOriginValidator def validate_origin_for_username!(origin, username) origins_for_username = @uaa_username_lookup_client.origins_for_username(username) if origin.present? unless origins_for_username.include?(origin) message = "username: '#{usernam...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/mixins/find_process_through_app.rb
Ruby
apache-2.0
203
main
358
module VCAP::CloudController module FindProcessThroughApp def find_guid(guid, model=ProcessModel) if model == ProcessModel web_process = AppModel.find(guid:).try(:newest_web_process) raise self.class.not_found_exception(guid, AppModel) if web_process.nil? web_process else ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/controllers/runtime/helpers/blob_dispatcher.rb
Ruby
apache-2.0
203
main
1,410
module VCAP::CloudController class BlobDispatcher def initialize(blobstore:, controller:) @blobstore = blobstore @controller = controller end def send_or_redirect(guid:) unless guid logger.error('No guid for BlobNotFound') raise CloudController::Errors::BlobNotFound ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/mappers/order_by_mapper.rb
Ruby
apache-2.0
203
main
1,239
module VCAP::CloudController class OrderByMapper class << self def from_param(order_by) first_character = order_by[0] if user_provided_direction?(first_character) order_by1 = remove_prefix(order_by) order_direction = prefix_to_direction(first_character) else ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/helpers/metadata_error.rb
Ruby
apache-2.0
203
main
327
module VCAP::CloudController class MetadataError < Struct.new(:is_valid?, :message) def self.error(message) MetadataError.new(false, message) end def self.none @none ||= MetadataError.new(true) end def to_s "#<MetadataError is_valid:#{is_valid?} message:#{message}>" end e...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/helpers/role_types.rb
Ruby
apache-2.0
203
main
803
module VCAP::CloudController class RoleTypes SPACE_AUDITOR = 'space_auditor'.freeze SPACE_MANAGER = 'space_manager'.freeze SPACE_DEVELOPER = 'space_developer'.freeze SPACE_SUPPORTER = 'space_supporter'.freeze ORGANIZATION_AUDITOR = 'organization_auditor'.freeze ORGANIZATION_MANAGER = 'organiza...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/helpers/health_check_types.rb
Ruby
apache-2.0
203
main
339
module VCAP::CloudController class HealthCheckTypes PORT = 'port'.freeze PROCESS = 'process'.freeze HTTP = 'http'.freeze NONE = 'none'.freeze def self.all_types [ HTTP, NONE, PORT, PROCESS ] end def self.readiness_types all_types - [NONE]...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/helpers/stack_config_file.rb
Ruby
apache-2.0
203
main
761
# frozen_string_literal: true module VCAP::CloudController class StackConfigFile def initialize(file_path) @hash = YAMLConfig.safe_load_file(file_path).tap do |h| Schema.validate(h) end end def stacks @hash['stacks'] end def deprecated_stacks @hash['deprecated_st...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/helpers/metadata_helpers.rb
Ruby
apache-2.0
203
main
1,380
module VCAP::CloudController class MetadataHelpers KEY_SEPARATOR = '/'.freeze REQUIREMENT_SPLITTER = /(?:\(.*?\)|[^,])+/ KEY_CHARACTERS = %r{[\w\-._/]+} IN_PATTERN = /\A(?<key>.*?) in \((?<values>.*)\)\z/ # foo in (bar,baz) NOT_IN_PATTERN = /\A(?<key>.*?) notin \((?<values>.*)...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/helpers/app_features.rb
Ruby
apache-2.0
203
main
677
module VCAP::CloudController class AppFeatures SSH_FEATURE = 'ssh'.freeze REVISIONS_FEATURE = 'revisions'.freeze SERVICE_BINDING_K8S_FEATURE = 'service-binding-k8s'.freeze FILE_BASED_VCAP_SERVICES_FEATURE = 'file-based-vcap-services'.freeze DATABASE_COLUMNS_MAPPING = { SSH_FEATURE => :enabl...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/helpers/metadata_model_mixin.rb
Ruby
apache-2.0
203
main
843
module VCAP::CloudController module MetadataModelMixin def self.included(included_class) included_class.class_eval <<-RUBY, __FILE__, __LINE__ + 1 # Transparently convert datatypes of key_prefix so empty strings are persisted in the DB instead of NULL def key_prefix self[:key_prefi...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/helpers/relational_operators.rb
Ruby
apache-2.0
203
main
217
module VCAP::CloudController class RelationalOperators LESS_THAN_COMPARATOR = :lt LESS_THAN_OR_EQUAL_COMPARATOR = :lte GREATER_THAN_COMPARATOR = :gt GREATER_THAN_OR_EQUAL_COMPARATOR = :gte end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/helpers/label_selector_requirement.rb
Ruby
apache-2.0
203
main
361
module VCAP::CloudController class LabelSelectorRequirement attr_accessor :key, :key_name, :key_prefix, :operator, :values def initialize(key:, operator:, values:) @key = key @key_prefix, @key_name = VCAP::CloudController::MetadataHelpers.extract_prefix(key) @operator = operator @valu...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/helpers/stack_states.rb
Ruby
apache-2.0
203
main
377
module VCAP::CloudController class StackStates STACK_ACTIVE = 'ACTIVE'.freeze STACK_RESTRICTED = 'RESTRICTED'.freeze STACK_DEPRECATED = 'DEPRECATED'.freeze STACK_DISABLED = 'DISABLED'.freeze DEFAULT_STATE = STACK_ACTIVE VALID_STATES = [ STACK_ACTIVE, STACK_RESTRICTED, STACK...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/user_provided_service_instance.rb
Ruby
apache-2.0
203
main
1,288
module VCAP::CloudController class UserProvidedServiceInstance < ServiceInstance export_attributes :name, :credentials, :space_guid, :type, :syslog_drain_url, :route_service_url, :tags import_attributes :name, :credentials, :space_guid, :syslog_drain_url, :route_service_url, :tags # sad: can we declare t...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_binding_annotation_model.rb
Ruby
apache-2.0
203
main
331
module VCAP::CloudController class ServiceBindingAnnotationModel < Sequel::Model(:service_binding_annotations) set_primary_key :id many_to_one :service_binding, primary_key: :guid, key: :resource_guid, without_guid_generation: true include MetadataModelMixin...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/managed_service_instance.rb
Ruby
apache-2.0
203
main
4,035
require 'vcap/request' require 'models/runtime/helpers/service_operation_mixin' module VCAP::CloudController class ManagedServiceInstance < ServiceInstance include ServiceOperationMixin INITIAL_STRING = 'initial'.freeze IN_PROGRESS_STRING = 'in progress'.freeze many_to_one :service_plan export...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_plan.rb
Ruby
apache-2.0
203
main
7,056
# frozen_string_literal: true module VCAP::CloudController class ServicePlan < Sequel::Model many_to_one :service one_to_many :service_instances one_to_many :service_plan_visibilities, clearer: lambda { service_plan_visibilities_dataset.delete } add_association_dependencies service_plan_v...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/route_binding_operation.rb
Ruby
apache-2.0
203
main
230
module VCAP::CloudController class RouteBindingOperation < Sequel::Model export_attributes :state, :description, :type, :updated_at, :created_at def update_attributes(attrs) set attrs save end end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_key_operation.rb
Ruby
apache-2.0
203
main
228
module VCAP::CloudController class ServiceKeyOperation < Sequel::Model export_attributes :state, :description, :type, :updated_at, :created_at def update_attributes(attrs) set attrs save end end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_binding_label_model.rb
Ruby
apache-2.0
203
main
297
module VCAP::CloudController class ServiceBindingLabelModel < Sequel::Model(:service_binding_labels) many_to_one :service_binding, primary_key: :guid, key: :resource_guid, without_guid_generation: true include MetadataModelMixin end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_broker_label_model.rb
Ruby
apache-2.0
203
main
294
module VCAP::CloudController class ServiceBrokerLabelModel < Sequel::Model(:service_broker_labels) many_to_one :service_broker, primary_key: :guid, key: :resource_guid, without_guid_generation: true include MetadataModelMixin end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_offering_label_model.rb
Ruby
apache-2.0
203
main
348
module VCAP::CloudController class ServiceOfferingLabelModel < Sequel::Model(:service_offering_labels) many_to_one :service, class: 'VCAP::CloudController::Service', primary_key: :guid, key: :resource_guid, without_guid_generation: true include M...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_broker_update_request.rb
Ruby
apache-2.0
203
main
551
module VCAP::CloudController class ServiceBrokerUpdateRequest < Sequel::Model one_to_one :service_broker set_field_as_encrypted :authentication one_to_many :labels, class: 'VCAP::CloudController::ServiceBrokerUpdateRequestLabelModel', key: :resource_guid, primary_key: :guid one_to_many :annotations, ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_key_annotation_model.rb
Ruby
apache-2.0
203
main
319
module VCAP::CloudController class ServiceKeyAnnotationModel < Sequel::Model(:service_key_annotations) set_primary_key :id many_to_one :service_key, primary_key: :guid, key: :resource_guid, without_guid_generation: true include MetadataModelMixin end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_instance_operation.rb
Ruby
apache-2.0
203
main
406
module VCAP::CloudController class ServiceInstanceOperation < Sequel::Model plugin :serialization export_attributes :type, :state, :description, :updated_at, :created_at import_attributes :state, :description serialize_attributes :json, :proposed_changes def proposed_changes super || {} ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_broker.rb
Ruby
apache-2.0
203
main
2,599
module VCAP::CloudController class ServiceBroker < Sequel::Model one_to_many :services one_to_many :service_dashboard_client one_to_many :labels, class: 'VCAP::CloudController::ServiceBrokerLabelModel', key: :resource_guid, primary_key: :guid one_to_many :annotations, class: 'VCAP::CloudController::S...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_key.rb
Ruby
apache-2.0
203
main
3,833
require 'models/runtime/helpers/service_operation_mixin' module VCAP::CloudController class ServiceKey < Sequel::Model include ServiceOperationMixin class InvalidAppAndServiceRelation < StandardError; end many_to_one :service_instance one_to_one :service_key_operation one_to_many :labels, cla...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service.rb
Ruby
apache-2.0
203
main
5,669
module VCAP::CloudController class Service < Sequel::Model plugin :serialization many_to_one :service_broker one_to_many :service_plans add_association_dependencies service_plans: :destroy one_to_many :labels, class: 'VCAP::CloudController::ServiceOfferingLabelModel', key: :resource_guid, primar...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/route_binding_annotation_model.rb
Ruby
apache-2.0
203
main
325
module VCAP::CloudController class RouteBindingAnnotationModel < Sequel::Model(:route_binding_annotations) set_primary_key :id many_to_one :route_binding, primary_key: :guid, key: :resource_guid, without_guid_generation: true include MetadataModelMixin end...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_key_label_model.rb
Ruby
apache-2.0
203
main
285
module VCAP::CloudController class ServiceKeyLabelModel < Sequel::Model(:service_key_labels) many_to_one :service_key, primary_key: :guid, key: :resource_guid, without_guid_generation: true include MetadataModelMixin end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/route_binding_label_model.rb
Ruby
apache-2.0
203
main
291
module VCAP::CloudController class RouteBindingLabelModel < Sequel::Model(:route_binding_labels) many_to_one :route_binding, primary_key: :guid, key: :resource_guid, without_guid_generation: true include MetadataModelMixin end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_credential_binding_view.rb
Ruby
apache-2.0
203
main
11,901
module VCAP module CloudController module ServiceCredentialBinding module Types SERVICE_KEY = 'key'.freeze SERVICE_BINDING = 'app'.freeze end SERVICE_KEY_VIEW = Sequel::Model(:service_keys).select( Sequel.as(:service_keys__id, :id), Sequel.as(:service_keys__guid,...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_broker_update_request_label_model.rb
Ruby
apache-2.0
203
main
337
module VCAP::CloudController class ServiceBrokerUpdateRequestLabelModel < Sequel::Model(:service_broker_update_request_labels) many_to_one :service_broker_update_request, primary_key: :guid, key: :resource_guid, without_guid_generation: true include MetadataMode...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_broker_state_enum.rb
Ruby
apache-2.0
203
main
305
module VCAP::CloudController class ServiceBrokerStateEnum SYNCHRONIZING = 'SYNCHRONIZING'.freeze SYNCHRONIZATION_FAILED = 'SYNCHRONIZATION_FAILED'.freeze AVAILABLE = 'AVAILABLE'.freeze DELETE_IN_PROGRESS = 'DELETE_IN_PROGRESS'.freeze DELETE_FAILED = 'DELETE_FAILED'.freeze end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_binding_operation.rb
Ruby
apache-2.0
203
main
264
module VCAP::CloudController class ServiceBindingOperation < Sequel::Model export_attributes :state, :description, :type, :updated_at, :created_at many_to_one :service_binding def update_attributes(attrs) set attrs save end end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_instance.rb
Ruby
apache-2.0
203
main
9,306
require 'repositories/service_usage_event_repository' module VCAP::CloudController class ServiceInstance < Sequel::Model class InvalidServiceBinding < StandardError; end ROUTE_SERVICE_WARNING = 'Support for route services is disabled. This service instance cannot be bound to a route.'.freeze VOLUME_SERV...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_broker_update_request_annotation_model.rb
Ruby
apache-2.0
203
main
371
module VCAP::CloudController class ServiceBrokerUpdateRequestAnnotationModel < Sequel::Model(:service_broker_update_request_annotations) set_primary_key :id many_to_one :service_broker_update_request, primary_key: :guid, key: :resource_guid, without_guid_generat...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_usage_event.rb
Ruby
apache-2.0
203
main
449
module VCAP::CloudController class ServiceUsageEvent < Sequel::Model plugin :serialization export_attributes :state, :org_guid, :space_guid, :space_name, :service_instance_guid, :service_instance_name, :service_instance_type, :service_plan_guid, :service_plan_name,...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_plan_annotation_model.rb
Ruby
apache-2.0
203
main
383
module VCAP::CloudController class ServicePlanAnnotationModel < Sequel::Model(:service_plan_annotations) set_primary_key :id many_to_one :service_plan, class: 'VCAP::CloudController::ServicePlan', primary_key: :guid, key: :resource_guid, without_...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_plan_visibility.rb
Ruby
apache-2.0
203
main
1,304
module VCAP::CloudController class ServicePlanVisibility < Sequel::Model many_to_one :service_plan many_to_one :organization import_attributes :service_plan_guid, :organization_guid export_attributes :service_plan_guid, :organization_guid def around_save yield rescue Sequel::UniqueCons...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_offering_annotation_model.rb
Ruby
apache-2.0
203
main
382
module VCAP::CloudController class ServiceOfferingAnnotationModel < Sequel::Model(:service_offering_annotations) set_primary_key :id many_to_one :service, class: 'VCAP::CloudController::Service', primary_key: :guid, key: :resource_guid, without_g...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_broker_annotation_model.rb
Ruby
apache-2.0
203
main
328
module VCAP::CloudController class ServiceBrokerAnnotationModel < Sequel::Model(:service_broker_annotations) set_primary_key :id many_to_one :service_broker, primary_key: :guid, key: :resource_guid, without_guid_generation: true include MetadataModelMixin ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_plan_label_model.rb
Ruby
apache-2.0
203
main
349
module VCAP::CloudController class ServicePlanLabelModel < Sequel::Model(:service_plan_labels) many_to_one :service_plan, class: 'VCAP::CloudController::ServicePlan', primary_key: :guid, key: :resource_guid, without_guid_generation: true include ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_dashboard_client.rb
Ruby
apache-2.0
203
main
1,475
module VCAP::CloudController class ServiceDashboardClient < Sequel::Model many_to_one :service_broker def around_save yield rescue Sequel::UniqueConstraintViolation => e raise e unless e.message.include?('s_d_clients_uaa_id_unique') errors.add(:uaa_id, :unique) raise validation_f...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/service_binding.rb
Ruby
apache-2.0
203
main
5,142
require 'models/helpers/process_types' require 'models/runtime/helpers/service_operation_mixin' module VCAP::CloudController class ServiceBinding < Sequel::Model include Serializer include ServiceOperationMixin plugin :after_initialize one_to_one :service_binding_operation one_to_many :labels,...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/services/route_binding.rb
Ruby
apache-2.0
203
main
2,733
require 'cloud_controller/process_route_handler' require 'models/runtime/helpers/service_operation_mixin' module VCAP::CloudController class RouteBinding < Sequel::Model include ServiceOperationMixin plugin :after_initialize one_to_one :route_binding_operation one_to_many :labels, class: 'VCAP::Cl...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/buildpack_bits_delete.rb
Ruby
apache-2.0
203
main
636
module VCAP::CloudController class BuildpackBitsDelete def self.delete_when_safe(blobstore_key, staging_timeout) return unless blobstore_key blobstore = CloudController::DependencyLocator.instance.buildpack_blobstore blob = blobstore.blob(blobstore_key) return unless blob attrs = b...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/app_model.rb
Ruby
apache-2.0
203
main
7,642
require 'cloud_controller/database_uri_generator' require 'cloud_controller/serializer' require 'models/helpers/process_types' require 'hashdiff' module VCAP::CloudController class AppModel < Sequel::Model(:apps) include Serializer APP_NAME_REGEX = /\A[[:alnum:][:punct:][:print:]]+\Z/ DEFAULT_CONTAINER_...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/package_annotation_model.rb
Ruby
apache-2.0
203
main
371
module VCAP::CloudController class PackageAnnotationModel < Sequel::Model(:package_annotations) set_primary_key :id many_to_one :package, class: 'VCAP::CloudController::PackageModel', primary_key: :guid, key: :resource_guid, without_guid_generati...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/droplet_model.rb
Ruby
apache-2.0
203
main
6,923
module VCAP::CloudController class DropletModel < Sequel::Model(:droplets) include Serializer DROPLET_STATES = [ STAGING_STATE = 'STAGING'.freeze, COPYING_STATE = 'COPYING'.freeze, FAILED_STATE = 'FAILED'.freeze, STAGED_STATE = 'STAGED'.freeze, EXPIRED_STATE = 'EXPIRED'.freeze, ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/docker_lifecycle_data_model.rb
Ruby
apache-2.0
203
main
506
require 'cloud_controller/diego/lifecycles/lifecycles' module VCAP::CloudController class DockerLifecycleDataModel LIFECYCLE_TYPE = Lifecycles::DOCKER def buildpacks [] end def buildpack_models [AutoDetectionBuildpack.new] end def using_custom_buildpack? false end ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/domain_label_model.rb
Ruby
apache-2.0
203
main
332
module VCAP::CloudController class DomainLabelModel < Sequel::Model(:domain_labels) many_to_one :domain, class: 'VCAP::CloudController::DomainModel', primary_key: :guid, key: :resource_guid, without_guid_generation: true include MetadataModelMixi...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/revision_process_command_model.rb
Ruby
apache-2.0
203
main
687
module VCAP::CloudController class RevisionProcessCommandModel < Sequel::Model(:revision_process_commands) many_to_one :revision, class: 'VCAP::CloudController::RevisionModel', primary_key: :guid, key: :revision_guid, without_guid_generation: true ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/build_label_model.rb
Ruby
apache-2.0
203
main
328
module VCAP::CloudController class BuildLabelModel < Sequel::Model(:build_labels) many_to_one :build, class: 'VCAP::CloudController::BuildModel', primary_key: :guid, key: :resource_guid, without_guid_generation: true include MetadataModelMixin ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/organization_annotation_model.rb
Ruby
apache-2.0
203
main
386
module VCAP::CloudController class OrganizationAnnotationModel < Sequel::Model(:organization_annotations) set_primary_key :id many_to_one :organization, class: 'VCAP::CloudController::Organization', primary_key: :guid, key: :resource_guid, withou...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/service_instance_annotation_model.rb
Ruby
apache-2.0
203
main
400
module VCAP::CloudController class ServiceInstanceAnnotationModel < Sequel::Model(:service_instance_annotations) set_primary_key :id many_to_one :service_instance, class: 'VCAP::CloudController::ServiceInstance', primary_key: :guid, key: :resource_guid, ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/kpack_lifecycle_data_model.rb
Ruby
apache-2.0
203
main
1,230
require 'cloud_controller/diego/lifecycles/lifecycles' module VCAP::CloudController class KpackLifecycleDataModel < Sequel::Model(:kpack_lifecycle_data) include Serializer many_to_one :app, class: '::VCAP::CloudController::AppModel', key: :app_guid, primary_ke...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/revision_sidecar_model.rb
Ruby
apache-2.0
203
main
1,346
module VCAP::CloudController class RevisionSidecarModel < Sequel::Model(:revision_sidecars) include SidecarMixin many_to_one :revision, class: 'VCAP::CloudController::RevisionModel', key: :revision_guid, primary_key: :guid, without_guid_generati...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/user_annotation_model.rb
Ruby
apache-2.0
203
main
359
module VCAP::CloudController class UserAnnotationModel < Sequel::Model(:user_annotations) set_primary_key :id many_to_one :user, class: 'VCAP::CloudController::UserModel', primary_key: :guid, key: :resource_guid, without_guid_generation: true ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/build_model.rb
Ruby
apache-2.0
203
main
4,229
require 'repositories/app_usage_event_repository' module VCAP::CloudController class BuildModel < Sequel::Model(:builds) STAGING_MEMORY = 1024 BUILD_STATES = [ STAGING_STATE = 'STAGING'.freeze, STAGED_STATE = 'STAGED'.freeze, FAILED_STATE = 'FAILED'.freeze ].freeze FINAL_STATES = [ ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/droplet_annotation_model.rb
Ruby
apache-2.0
203
main
371
module VCAP::CloudController class DropletAnnotationModel < Sequel::Model(:droplet_annotations) set_primary_key :id many_to_one :droplet, class: 'VCAP::CloudController::DropletModel', primary_key: :guid, key: :resource_guid, without_guid_generati...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/environment_variable_group.rb
Ruby
apache-2.0
203
main
1,287
require 'messages/validators' module VCAP::CloudController class EnvironmentVariableGroup < Sequel::Model(:env_groups) import_attributes :environment_json export_attributes :name, :environment_json set_field_as_encrypted :environment_json def self.running find_by_name(:running) end d...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/sidecar_process_type_model.rb
Ruby
apache-2.0
203
main
830
module VCAP::CloudController class SidecarProcessTypeModel < Sequel::Model(:sidecar_process_types) many_to_one :sidecar, class: 'VCAP::CloudController::SidecarModel', primary_key: :guid, key: :sidecar_guid, without_guid_generation: true def arou...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/isolation_segment_model.rb
Ruby
apache-2.0
203
main
1,597
module VCAP::CloudController class IsolationSegmentModel < Sequel::Model(:isolation_segments) SHARED_ISOLATION_SEGMENT_GUID = '933b4c58-120b-499a-b85d-4b6fc9e2903b'.freeze include Serializer ISOLATION_SEGMENT_MODEL_REGEX = /\A[[:print:]]+\Z/ one_to_many :spaces, key: :isolation_segment_guid, primar...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/organization.rb
Ruby
apache-2.0
203
main
12,920
require 'models/helpers/process_types' module VCAP::CloudController class Organization < Sequel::Model ORG_NAME_REGEX = /\A[[:alnum:][:punct:][:print:]]+\Z/ ACTIVE = 'active'.freeze SUSPENDED = 'suspended'.freeze ORG_STATUS_VALUES = [ACTIVE, SUSPENDED].freeze one_to_many :spaces many_to_one...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/space_quota_definition.rb
Ruby
apache-2.0
203
main
3,994
module VCAP::CloudController class SpaceQuotaDefinition < Sequel::Model UNLIMITED = -1 # Default values DEFAULT_NON_BASIC_SERVICES_ALLOWED = true DEFAULT_MEMORY_LIMIT = UNLIMITED DEFAULT_TOTAL_SERVICES = UNLIMITED DEFAULT_TOTAL_ROUTES = UNLIMITED RESERVED_PORT_ERROR = Sequel.lit('Total r...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/organization_reserved_route_ports.rb
Ruby
apache-2.0
203
main
500
module VCAP::CloudController class OrganizationReservedRoutePorts def initialize(organization) @organization = organization end delegate :count, to: :dataset private def dataset VCAP::CloudController::Route.dataset. join(:spaces, id: :space_id). join(:domains, id: :r...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/deployment_annotation_model.rb
Ruby
apache-2.0
203
main
383
module VCAP::CloudController class DeploymentAnnotationModel < Sequel::Model(:deployment_annotations) set_primary_key :id many_to_one :deployment, class: 'VCAP::CloudController::DeploymentModel', primary_key: :guid, key: :resource_guid, without_g...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/organization_billing_manager.rb
Ruby
apache-2.0
203
main
235
module VCAP::CloudController class OrganizationBillingManager < Sequel::Model(:organizations_billing_managers) include OrganizationRoleMixin def type @type ||= RoleTypes::ORGANIZATION_BILLING_MANAGER end end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/deployment_process_model.rb
Ruby
apache-2.0
203
main
324
module VCAP::CloudController class DeploymentProcessModel < Sequel::Model(:deployment_processes) many_to_one :deployment, class: 'VCAP::CloudController::DeploymentModel', key: :deployment_guid, primary_key: :guid, without_guid_generation: true end ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/organization_label_model.rb
Ruby
apache-2.0
203
main
351
module VCAP::CloudController class OrganizationLabelModel < Sequel::Model(:organization_labels) many_to_one :organization, class: 'VCAP::CloudController::Organization', primary_key: :guid, key: :resource_guid, without_guid_generation: true includ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/revision_model.rb
Ruby
apache-2.0
203
main
2,026
module VCAP::CloudController class RevisionModel < Sequel::Model(:revisions) include Serializer many_to_one :app, class: '::VCAP::CloudController::AppModel', key: :app_guid, primary_key: :guid, without_guid_generation: true many_to_one :dro...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/role.rb
Ruby
apache-2.0
203
main
7,238
require 'models/helpers/role_types' module VCAP::CloudController SPACE_OR_ORGANIZATION_NOT_SPECIFIED = -1 # Creates UNIONed dataset and supports building a dataset with filters (i.e. WHERE conditions) per role (i.e. # individual table). class RoleDataset class << self def model_by_role(role) ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/private_domain.rb
Ruby
apache-2.0
203
main
3,806
require 'models/runtime/domain' require 'public_suffix' module VCAP::CloudController class PrivateDomain < Domain set_dataset(private_domains) add_association_dependencies routes: :destroy export_attributes :name, :owning_organization_guid import_attributes :name, :owning_organization_guid stri...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/deployment_label_model.rb
Ruby
apache-2.0
203
main
348
module VCAP::CloudController class DeploymentLabelModel < Sequel::Model(:deployment_labels) many_to_one :deployment, class: 'VCAP::CloudController::DeploymentModel', primary_key: :guid, key: :resource_guid, without_guid_generation: true include M...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/organization_user.rb
Ruby
apache-2.0
203
main
203
module VCAP::CloudController class OrganizationUser < Sequel::Model(:organizations_users) include OrganizationRoleMixin def type @type ||= RoleTypes::ORGANIZATION_USER end end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/stack_label_model.rb
Ruby
apache-2.0
203
main
323
module VCAP::CloudController class StackLabelModel < Sequel::Model(:stack_labels) many_to_one :stack, class: 'VCAP::CloudController::Stack', primary_key: :guid, key: :resource_guid, without_guid_generation: true include MetadataModelMixin end e...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/organization_manager.rb
Ruby
apache-2.0
203
main
212
module VCAP::CloudController class OrganizationManager < Sequel::Model(:organizations_managers) include OrganizationRoleMixin def type @type ||= RoleTypes::ORGANIZATION_MANAGER end end end
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/buildpack_label_model.rb
Ruby
apache-2.0
203
main
339
module VCAP::CloudController class BuildpackLabelModel < Sequel::Model(:buildpack_labels) many_to_one :buildpack, class: 'VCAP::CloudController::Buildpack', primary_key: :guid, key: :resource_guid, without_guid_generation: true include MetadataMo...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/asg_latest_update.rb
Ruby
apache-2.0
203
main
503
module VCAP::CloudController class AsgLatestUpdate class AsgTimestamp < Sequel::Model plugin :microsecond_timestamp_precision end private_constant :AsgTimestamp def self.renew old_update = AsgTimestamp.first if old_update old_update.update(last_update: Time.now.utc) el...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/space.rb
Ruby
apache-2.0
203
main
15,851
require 'models/helpers/process_types' require 'cloud_controller/errors/invalid_relation' module VCAP::CloudController class Space < Sequel::Model class InvalidDeveloperRelation < CloudController::Errors::InvalidRelation; end class InvalidAuditorRelation < CloudController::Errors::InvalidRelation; end cl...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/space_annotation_model.rb
Ruby
apache-2.0
203
main
358
module VCAP::CloudController class SpaceAnnotationModel < Sequel::Model(:space_annotations) set_primary_key :id many_to_one :space, class: 'VCAP::CloudController::Space', primary_key: :guid, key: :resource_guid, without_guid_generation: true ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/process_model.rb
Ruby
apache-2.0
203
main
19,958
require 'cloud_controller/process_observer' require 'cloud_controller/database_uri_generator' require 'cloud_controller/errors/application_missing' require 'repositories/app_usage_event_repository' require 'presenters/v3/cache_key_presenter' require 'utils/uri_utils' require 'models/runtime/helpers/package_state_calcul...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/isolation_segment_label_model.rb
Ruby
apache-2.0
203
main
369
module VCAP::CloudController class IsolationSegmentLabelModel < Sequel::Model(:isolation_segment_labels) many_to_one :isolation_segment, class: 'VCAP::CloudController::IsolationSegment', primary_key: :guid, key: :resource_guid, without_guid_generatio...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
app/models/runtime/stack.rb
Ruby
apache-2.0
203
main
3,273
require 'models/helpers/process_types' require 'models/helpers/stack_config_file' require 'models/helpers/stack_states' module VCAP::CloudController class Stack < Sequel::Model class MissingConfigFileError < StandardError end class MissingDefaultStackError < StandardError end class AppsStillPrese...