lib/rancher/api/models/project.rb in rancher-api-beta-0.8.0.pre.beta vs lib/rancher/api/models/project.rb in rancher-api-beta-0.8.1

- old
+ new

@@ -1,23 +1,62 @@ # frozen_string_literal: true -# These are 'Environments' in the UI module Rancher module Api class Project include Her::Model include Helpers::Model - has_many :machines + include Rancher::Api::Helpers::Project + belongs_to :defaultnetwork + belongs_to :projecttemplate + has_one :projecttemplate + has_many :projectmembers + has_many :scheduledupgrades + has_many :auditlogs + has_many :credentials + has_many :instances + has_many :processinstances + has_many :serviceexposemaps + has_many :networks + has_many :ports + has_many :serviceconsumemaps + has_many :instancelinks + has_many :ipaddresses + has_many :storagepools + has_many :externalevents + has_many :subnets + has_many :userpreferences + has_many :projecttemplates + has_many :images + has_many :volumetemplates has_many :hosts - has_many :environments + has_many :stacks + has_many :volumes + has_many :mounts + has_many :serviceevents has_many :services + has_many :networkdrivers + has_many :secrets + has_many :agents + has_many :labels + has_many :healthcheckinstancehostmaps + has_many :snapshots + has_many :hosttemplates + has_many :certificates + has_many :backuptargets + has_many :genericobjects + has_many :storagedrivers + has_many :configitemstatuses + has_many :physicalhosts + has_many :containerevents + has_many :servicelogs + has_many :backups - class << self - def find_by_name(name:) - # filters not working for name yet, so using select - all.reject { |e| e.state.eql?('purged') }.select { |e| e.name.eql?(name) } - end - end + attributes :created, :data, :defaultNetworkId, :description, :healthState, + :id, :kind, :name, :projectTemplateId, :removeTime, + :removed, :state, :transitioning, :transitioningMessage, :transitioningProgress, + :uuid, :version, :hostRemoveDelaySeconds, :allowSystemRole, :members, + :orchestration, :virtualMachine, :servicesPortRange, :projectLinks end end end