Module: MintPress::OracleWeblogic::Utils
- Included in:
- MintPress::OracleAnalyticsServer::CommonSystemComponent, MintPress::OracleDatabase::Patch, MintPress::OracleDatabase::PatchSet, MintPress::OracleHTTPServer::SystemComponent, MintPress::OracleInternetDirectory::SystemComponent, MintPress::OracleUnifiedDirectory::DirectoryServer, MintPress::OracleUnifiedDirectory::ProxyServer, MintPress::OracleUnifiedDirectory::ReplicationServer, ActiveDirectoryAuthenticator, Adjudicator, AdminConsole, AdminServer, AppDeployment, Application, ApplicationMbean, ApplicationMbeanDeprecated, Auditor, AuthConfigProvider, AuthModule, AuthenticationProvider, Authenticator, Authorizer, BasicDeployment, BatchConfig, BridgeDestination, BridgeDestinationCommon, COM, CacheAsyncListeners, CacheExpiration, CacheLoader, CacheStore, CacheTransaction, Capacity, CdiContainer, CertPathBuilder, CertPathProvider, CertPathValidator, CertRevoc, CertRevocCa, CertificateRegistry, ClassPath, ClientParams, Cluster, CoherenceAddressProvider, CoherenceAddressProviders, CoherenceCache, CoherenceCacheConfig, CoherenceClusterSystemResource, CoherenceClusterWellKnownAddress, CoherenceClusterWellKnownAddresses, CoherenceInitParam, CoherenceManagementCluster, CoherenceManagementJMXAddress, CoherenceMemberConfig, CoherencePartitionCacheConfig, CoherencePartitionCacheProperty, CoherenceServer, CoherenceServerStart, CoherenceService, CoherenceSocketAddress, CoherenceTier, Component, ConfigurationProperty, ConnectorComponent, ContextCase, ContextRequestClass, CpuUtilization, CredentialMapper, CustomAuthConfigProvider, CustomDBMSAuthenticator, CustomMbean, CustomResource, DBMSAuthenticator, DataSource, DataSourceLogFile, DataSourcePartition, DatabaseLessLeasingBasis, DatasourceInterceptor, DebugScope, DefaultAdjudicator, DefaultAuditor, DefaultAuthenticator, DefaultAuthorizer, DefaultCredentialMapper, DefaultDeliveryParams, DefaultFileStore, DefaultIdentityAsserter, DefaultKeyStore, DefaultRoleMapper, DeliveryFailureParams, DeployableAuthorizer, DeployableCredentialMapper, DeployableRoleMapper, Deployment, DeploymentConfiguration, DeploymentManager, DeploymentOptions, DeploymentProgressObject, DeploymentValidationPlugin, Destination, DestinationKey, DeterminerCandidateResourceInfoV, DistributedDestinationMember, DistributedQueue, DistributedTopic, Domain, DomainLogFilter, DynamicServers, EJBComponent, EditSessionConfigurationManager, EmbeddedLDAP, ErrorHandling, ExecuteQueue, ExecuteThread, FairShareConstraint, FairShareRequestClass, FederationServices, FileOpen, FileStore, FlowControlParams, ForeignConnectionFactory, ForeignConnectionFactoryOverride, ForeignDestination, ForeignDestinationOverride, ForeignJMSConnectionFactory, ForeignJMSDestination, ForeignJNDILink, ForeignJNDILinkOverride, ForeignJNDIProvider, ForeignJNDIProviderOverride, ForeignServer, ForeignServerOverride, GenericMbean, Group, GroupParams, GzipCompression, HealthState, HeapRetained, IIOP, IPlanetAuthenticator, IdentityAsserter, Installation, Interceptor, JASPIC, JDBCConnectionLeakProfile, JDBCConnectionPool, JDBCDataSource, JDBCDataSourceFactory, JDBCDataSourceParams, JDBCDriverParams, JDBCMultiPool, JDBCProperties, JDBCProperty, JDBCPropertyOverride, JDBCStatementProfile, JDBCStore, JDBCSystemResource, JDBCSystemResourceOverride, JDBCTxDataSource, JMSBridgeDestination, JMSConnectionConsumer, JMSConnectionFactory, JMSDestination, JMSDestinationKey, JMSDistributedQueue, JMSDistributedQueueMember, JMSDistributedTopic, JMSDistributedTopicMember, JMSFileStore, JMSInteropModule, JMSJDBCStore, JMSMessageLogFile, JMSQueue, JMSSAFMessageLogFile, JMSServer, JMSSessionPool, JMSStore, JMSSystemResource, JMSSystemResourceOverride, JMSTemplate, JMSTopic, JMX, JPA, JTA, JTACluster, JTAMigratableTarget, JTAPartition, JTATransaction, JavaEEProperty, JoltConnectionPool, JpsConfig, KeyStore, LDAPAuthenticator, LDAPX509IdentityAsserter, Library, LifecycleManagerConfig, LifecycleManagerEndPoint, LoadBalancingParams, Log, LogFilter, LoginExceptionPropagator, MBeanUtils, Machine, MailSession, MailSessionOverride, ManagedExecutorServiceTemplate, ManagedScheduledExecutorServiceTemplate, ManagedThreadFactoryTemplate, MaxThreadsConstraint, MessagingBridge, MetadataRepository, MigratableTarget, MinThreadsConstraint, NegotiateIdentityAsserter, NetworkAccessPoint, NetworkChannel, NodeManager, NovellAuthenticator, OpenLDAPAuthenticator, OptionalFeature, OptionalFeatureDeployment, OracleInternetDirectoryAuthenticator, OracleVirtualDirectoryAuthenticator, OsgiFramework, OverloadProtection, PKICredentialMapper, PageFlowError, Parameter, Partition, PartitionFileSystem, PartitionLog, PartitionProperty, PartitionUserFileSystem, PartitionUserFileSystemManager, PartitionWorkManager, PasswordValidator, Patch, PatchSet, PathService, PersistentStore, PostProcessorScript, PreProcessorScript, Property, Queue, Quota, RDBMSSecurityStore, ReadOnlySQLAuthenticator, Realm, RealmAdapterAdjudicator, RealmAdapterAuditor, RealmAdapterAuthenticator, RealmAdapterAuthorizer, RecourseActionEventV, RemoteSAFContext, ReplicatedStore, ResourceGroup, ResourceGroupTemplate, ResourceManagement, ResourceManager, ResponseTimeRequestClass, RestartLoopProtection, RestfulManagementServices, RoleMapper, SAFAgent, SAFDestination, SAFErrorHandling, SAFImportedDestinations, SAFQueue, SAFRemoteContext, SAFStatisticsCommon, SAFTopic, SAMLAssertingParty, SAMLAuthenticator, SAMLCredentialMapper, SAMLCredentialMapperV2, SAMLIdentityAsserter, SAMLIdentityAsserterV2, SAMLRelyingParty, SNMPAgent, SNMPAgentDeployment, SNMPAttributeChange, SNMPCounterMonitor, SNMPGaugeMonitor, SNMPLogFilter, SNMPProxy, SNMPStringMonitor, SNMPTrapDestination, SQLAuthenticator, SSL, Scaleout, ScriptInterceptor, SecureMode, Security, SecurityConfiguration, SelfTuning, Server, ServerDebug, ServerFailureTrigger, ServerStart, ServerTemplate, ServletAuthenticationFilter, ShutdownClass, SingleSignOnServices, SingletonService, SingletonServiceAppScoped, SpringDependencyValue, StartUpControl, StartupArguments, StartupClass, SubDeployment, SystemComponent, SystemComponentStart, SystemResource, Target, TargetStatus, Template, TemplateSet, Timer, Topic, TransactionLogJDBCStore, TransactionLogStore, TransactionParams, Trigger, UniformDistributedDestination, UniformDistributedQueue, UniformDistributedTopic, UnixMachine, User, UserLockoutManager, VirtualHost, VirtualTarget, VirtualUserAuthenticator, WLDFAction, WLDFDataRetirement, WLDFDataRetirementByAge, WLDFHarvestedType, WLDFHarvester, WLDFHeapDumpAction, WLDFImageNotification, WLDFInstrumentation, WLDFInstrumentationMonitor, WLDFJMSNotification, WLDFJMXNotification, WLDFLogAction, WLDFNotification, WLDFRESTNotification, WLDFSMTPNotification, WLDFSNMPNotification, WLDFScaleDownAction, WLDFScaleUpAction, WLDFScalingAction, WLDFScriptAction, WLDFServerDiagnostic, WLDFSystemResource, WLDFThreadDumpAction, WLDFWatch, WLDFWatchNotification, WLECConnectionPool, WLSAuthConfigProvider, WSReliableDeliveryPolicy, WTCExport, WTCImport, WTCLocalTuxDom, WTCPassword, WTCRemoteTuxDom, WTCResources, WTCServer, WTCtBridgeGlobal, WTCtBridgeRedirect, WebAppComponent, WebAppContainer, WebLogicCertPathProvider, WebServer, WebServerLog, WebService, WebServiceBuffering, WebServiceComponent, WebServiceLogicalStore, WebServicePersistence, WebServicePhysicalStore, WebServiceReliability, WebServiceRequestBufferingQueue, WebServiceResiliency, WebServiceResponseBufferingQueue, WeblogicCoherence, WebserviceCredentialProvider, WebserviceSecurity, WebserviceSecurityToken, WebserviceTestpage, WebserviceTimestamp, WebserviceTokenHandler, WindowsNTAuthenticator, WorkManager, WorkManagerShutdownTrigger, XMLEntityCache, XMLEntitySpecRegistryEntry, XMLParserSelectRegistryEntry, XMLRegistry, XMLRegistryEntry
- Defined in:
- src/oracle-weblogic/lib/oracle-weblogic/utils.rb
Overview
Class Method Summary collapse
Instance Method Summary collapse
-
#activate_list ⇒ Object
This hash is used to keep track of the changes that'll be activated.
- #already_traversed ⇒ Object
- #announce_self ⇒ Object
- #bean_type ⇒ Object
-
#build_activate_list(p_list) ⇒ Object
iterate through the activate_list and build a hash of all updates in this commit.
- #clear_property_sheet_cache ⇒ Object
- #create_generic ⇒ Object
-
#create_mbean_components(wlst, mbean_components, mbean_properties, full_path, apply_properties: true) ⇒ Object
Ensure any child components exist, and fill out their properties....
- #delete ⇒ Object
- #destroy_generic ⇒ Object
-
#empty_mbean?(empty_stack: []) ⇒ Boolean
Check if us _or_ our children are completly empty containers, and hence should NOT be created/traversed!.
-
#execute_script(script, stage, transport) ⇒ Object
Helper function to Execute script before or after a patch or install stage can be before or after.
- #exists? ⇒ Boolean
- #fast_ls_all(wlst) ⇒ Object
- #fast_ls_folder(wlst) ⇒ Object
- #fast_ls_object(wlst) ⇒ Object
- #fast_ls_object_map(wlst) ⇒ Object
-
#find_cluster(domain:, pattern:) ⇒ Object
Return the cluster for a given pattern.
-
#find_runtime_path_in_rest(url, runtime_name) ⇒ Object
This method will return the path Which we can then use to perform http actions against.
-
#find_server(domain:, pattern:) ⇒ Object
Return the server for a given pattern.
- #full_url(path) ⇒ Object
- #get(uri) ⇒ Object
- #get_all_self_names ⇒ Object
- #get_identity ⇒ Object
- #get_local_wlst_session ⇒ Object
-
#get_matching_self_names(patterns, items) ⇒ Object
This is for the datasource-named-* case - this gets the list of items which match us.
-
#get_property_from_target(name) ⇒ Object
This gets a value from the remote to support the validate function.
- #get_property_from_target_rest(name) ⇒ Object
- #get_property_from_target_wlst(name) ⇒ Object
- #get_property_from_target_wlst_impl(name) ⇒ Object
-
#get_property_sheet ⇒ Object
This returns a cached version of the rest property sheet for this object so that we don't constantly do round trips.
-
#get_rest_item(my_url, name, type) ⇒ Object
This takes a url, and gets a child item from within it of (name, type).
-
#get_rest_url_for_parent(including_self: false, edit_tree: true, report_only: true) ⇒ Object
who is my parent? or, if incluyding self, who ami i?.
-
#get_rest_url_for_self(edit_tree: true) ⇒ Object
who am i?.
- #get_servers ⇒ Object
- #get_servers_rest ⇒ Object
- #get_servers_wlst ⇒ Object
- #get_wl_home(t) ⇒ Object
-
#globmatch?(pattern, string, use_implied: false) ⇒ Boolean
This supprots get_matching_self_names - it's the matcher!.
- #handle_create(t) ⇒ Object
- #http_delete(path, headers = {}) ⇒ Object
- #http_get(path, headers = {}) ⇒ Object
- #http_post(path, payload, headers = {}) ⇒ Object
- #http_put(path, payload = nil, headers = {}) ⇒ Object
-
#invalidate_session(wlst) ⇒ Object
WLST based functions.
-
#is_meta_object? ⇒ Boolean
This returns true if we think that our resource name is gpoing to be a glob matcher, rather than a real complete item - this will match what is used in oldowrld for now, but probably needs something better!.
- #longclass ⇒ Object
-
#massage_return(response) ⇒ Object
The REST API's returns response in format: { "return": true } "soa_server2"=>{"return"=>false, "soa_server1"=>"return"=>false} This method converts the above to: true "soa_server1"=>false.
- #mbean_components ⇒ Object
- #mbean_exists? ⇒ Boolean
-
#mbean_lookup(path) ⇒ Object
Given an mbean path, return a mintpress object.
- #mbean_properties ⇒ Object
- #mbean_to_hash(v) ⇒ Object
-
#meta_list?(name) ⇒ Boolean
Common place to define the meta characters.
- #my_short_name ⇒ Object
-
#perform_method_generic(method_name) ⇒ Object
FIXME: This absolutely should be updated to support things that require parameters - what I (JJ) haven't worked out yet, is how to encode that into our model...
- #perform_runtime_call_generic_rest(runtime_name, function_name, props_hash, on_server, java_type: nil) ⇒ Object
- #perform_runtime_method_generic(runtime_name, function_name, props_hash, on_server: nil, java_type: nil) ⇒ Object
- #post(uri, payload) ⇒ Object
- #raise_http_exception(caught_exception, path) ⇒ Object
- #remove ⇒ Object
- #request_headers(opts = {}) ⇒ Object
-
#reset_activate_list ⇒ Object
Reset the activate_list - this is used post activate/undo.
- #rest_activate_change ⇒ Object
- #rest_create_generic ⇒ Object
- #rest_create_mbean_components(mbean_components, mbean_properties, self_rest_url) ⇒ Object
- #rest_destroy_self ⇒ Object
- #rest_edit_url(url) ⇒ Object
- #rest_has_changes ⇒ Object
- #rest_idempotent_create(name, type, parent_rest_url, bean_override: false, send_nil: false) ⇒ Object
-
#rest_locked ⇒ Object
Have we already locked this domain?.
- #rest_nonedit_url(url) ⇒ Object
- #rest_start_change ⇒ Object
- #rest_undo_change ⇒ Object
-
#runtime_introspection(value, bean_is_correct: false) ⇒ Object
This translates the %Name% type stuff that we allow in RT.
- #shortclass ⇒ Object
-
#start_with_async ⇒ Object
Helper function for starting with async functions - this is called by start(block: true) to implement the logic to wait until the start has happened.
- #state_with_net_ping ⇒ Object
-
#stop_with_async ⇒ Object
Helper function for stopping with async functions This is called by stop(block: true) to implement the logic to wait until the stop has happened.
-
#to_nested(hash) ⇒ Object
Utility method to convert a flat-hash to nested The key seperator is ~.
- #wlst_cd_to(wlst, f, loglevel: 'verbose') ⇒ Object
-
#wlst_create_generic(wlst = nil) ⇒ Object
This is a generic implement of object.create using WLST - a similar implementation exists for REST.
- #wlst_destroy_self(wlst) ⇒ Object
- #wlst_find_object(wlst, f, loglevel: 'verbose') ⇒ Object
- #wlst_find_parent_object(wlst, including_self: false, no_longclass: false, report_only: false, loglevel: 'verbose') ⇒ Object
-
#wlst_generic_mbean_update_all(wlst, full_path) ⇒ Object
This moves to common - it needs to be already set up with a path! ...
-
#wlst_idempotent_create(wlst, name, object_type, full_path) ⇒ Object
Generic create - this is inefficient though...
- #wlst_update_mbean(wlst, thing, what, full_path, using_encrypted: false, logged: false, orig_object: nil) ⇒ Object
Class Method Details
.included(base) ⇒ Object
Instance Method Details
#activate_list ⇒ Object
This hash is used to keep track of the changes that'll be activated
#already_traversed ⇒ Object
#announce_self ⇒ Object
#bean_type ⇒ Object
#build_activate_list(p_list) ⇒ Object
iterate through the activate_list and build a hash of all updates in this commit
#clear_property_sheet_cache ⇒ Object
#create_generic ⇒ Object
#create_mbean_components(wlst, mbean_components, mbean_properties, full_path, apply_properties: true) ⇒ Object
Ensure any child components exist, and fill out their properties....
#delete ⇒ Object
#destroy_generic ⇒ Object
#empty_mbean?(empty_stack: []) ⇒ Boolean
Check if us _or_ our children are completly empty containers, and hence should NOT be created/traversed!
#execute_script(script, stage, transport) ⇒ Object
Helper function to Execute script before or after a patch or install
stage can be before or after
#exists? ⇒ Boolean
#fast_ls_all(wlst) ⇒ Object
#fast_ls_folder(wlst) ⇒ Object
#fast_ls_object(wlst) ⇒ Object
#fast_ls_object_map(wlst) ⇒ Object
#find_cluster(domain:, pattern:) ⇒ Object
Return the cluster for a given pattern. This helps in not having to hardcode the cluster names in the code
#find_runtime_path_in_rest(url, runtime_name) ⇒ Object
This method will return the path
Which we can then use to perform http actions against
#find_server(domain:, pattern:) ⇒ Object
Return the server for a given pattern. This helps in not having to hardcode the server names in the code
#full_url(path) ⇒ Object
#get(uri) ⇒ Object
#get_all_self_names ⇒ Object
#get_identity ⇒ Object
#get_local_wlst_session ⇒ Object
#get_matching_self_names(patterns, items) ⇒ Object
This is for the datasource-named-* case - this gets the list of items which match us
#get_property_from_target(name) ⇒ Object
This gets a value from the remote to support the validate function. It is currently incomplete as hell,
as it only returns things casted to string - it needs to:
a) use a refactored version of validate_property that contains _just_ the casting stuff to deal with the type
system
b) Possibly create objects, though I think actually no - it should only return properties, not trees - if it doens't
exist, that should be validate fail anyhow!
c) definetly deal with object identity returns - i.e. the target stuff. This will be a hard requirement
for validating targetting of things like JDBC items anbd such
#get_property_from_target_rest(name) ⇒ Object
#get_property_from_target_wlst(name) ⇒ Object
#get_property_from_target_wlst_impl(name) ⇒ Object
#get_property_sheet ⇒ Object
This returns a cached version of the rest property sheet for this
object so that we don't constantly do round trips
#get_rest_item(my_url, name, type) ⇒ Object
This takes a url, and gets a child item from within it of (name, type)
#get_rest_url_for_parent(including_self: false, edit_tree: true, report_only: true) ⇒ Object
who is my parent? or, if incluyding self, who ami i?
#get_rest_url_for_self(edit_tree: true) ⇒ Object
who am i?
#get_servers ⇒ Object
#get_servers_rest ⇒ Object
#get_servers_wlst ⇒ Object
#get_wl_home(t) ⇒ Object
#globmatch?(pattern, string, use_implied: false) ⇒ Boolean
This supprots get_matching_self_names - it's the matcher!
#handle_create(t) ⇒ Object
#http_delete(path, headers = {}) ⇒ Object
#http_get(path, headers = {}) ⇒ Object
#http_post(path, payload, headers = {}) ⇒ Object
#http_put(path, payload = nil, headers = {}) ⇒ Object
#invalidate_session(wlst) ⇒ Object
WLST based functions
#is_meta_object? ⇒ Boolean
This returns true if we think that our resource name is gpoing to be a glob matcher, rather than a
real complete item - this will match what is used in oldowrld for now, but probably needs something
better!
#longclass ⇒ Object
#massage_return(response) ⇒ Object
The REST API's returns response in format:
{ "return": true }
"soa_server2"=>{"return"=>false, "soa_server1"=>"return"=>false}
This method converts the above to:
true
"soa_server1"=>false
#mbean_components ⇒ Object
#mbean_exists? ⇒ Boolean
#mbean_lookup(path) ⇒ Object
Given an mbean path, return a mintpress object
#mbean_properties ⇒ Object
#mbean_to_hash(v) ⇒ Object
#meta_list?(name) ⇒ Boolean
Common place to define the meta characters
#my_short_name ⇒ Object
#perform_method_generic(method_name) ⇒ Object
FIXME: This absolutely should be updated to support things that require parameters - what I (JJ) haven't worked
out yet, is how to encode that into our model...
#perform_runtime_call_generic_rest(runtime_name, function_name, props_hash, on_server, java_type: nil) ⇒ Object
#perform_runtime_method_generic(runtime_name, function_name, props_hash, on_server: nil, java_type: nil) ⇒ Object
#post(uri, payload) ⇒ Object
#raise_http_exception(caught_exception, path) ⇒ Object
#remove ⇒ Object
#request_headers(opts = {}) ⇒ Object
#reset_activate_list ⇒ Object
Reset the activate_list - this is used post activate/undo
#rest_activate_change ⇒ Object
#rest_create_generic ⇒ Object
#rest_create_mbean_components(mbean_components, mbean_properties, self_rest_url) ⇒ Object
#rest_destroy_self ⇒ Object
#rest_edit_url(url) ⇒ Object
#rest_has_changes ⇒ Object
#rest_idempotent_create(name, type, parent_rest_url, bean_override: false, send_nil: false) ⇒ Object
#rest_locked ⇒ Object
Have we already locked this domain?
#rest_nonedit_url(url) ⇒ Object
#rest_start_change ⇒ Object
#rest_undo_change ⇒ Object
#runtime_introspection(value, bean_is_correct: false) ⇒ Object
This translates the %Name% type stuff that we allow in RT
#shortclass ⇒ Object
#start_with_async ⇒ Object
Helper function for starting with async functions - this is called by
start(block: true) to implement the logic to wait until the start has happened
#state_with_net_ping ⇒ Object
#stop_with_async ⇒ Object
Helper function for stopping with async functions
This is called by stop(block: true) to implement the logic to wait until the stop has happened
#to_nested(hash) ⇒ Object
Utility method to convert a flat-hash to nested
The key seperator is ~
#wlst_cd_to(wlst, f, loglevel: 'verbose') ⇒ Object
#wlst_create_generic(wlst = nil) ⇒ Object
This is a generic implement of object.create using WLST - a similar implementation exists for
REST
There is some obvious limitations, particularly around items like targets right now - obviously this will be
fixed!
#wlst_destroy_self(wlst) ⇒ Object
#wlst_find_object(wlst, f, loglevel: 'verbose') ⇒ Object
#wlst_find_parent_object(wlst, including_self: false, no_longclass: false, report_only: false, loglevel: 'verbose') ⇒ Object
#wlst_generic_mbean_update_all(wlst, full_path) ⇒ Object
This moves to common - it needs to be already set up with a path!
... i don't love it.
#wlst_idempotent_create(wlst, name, object_type, full_path) ⇒ Object
Generic create - this is inefficient though...
If there is no create, it will make CMO the current object - it also returns
the path, for passing to update_all