private ModelNode createOSNode ( ) throws OperationFailedException { String osName = getProperty ( "os.name" ) ; final ModelNode os = new ModelNode ( ) ; if ( osName != null && osName . toLowerCase ( ) . contains ( "linux" ) ) { try { os . set ( GnuLinuxDistribution . discover ( ) ) ; } catch ( IOException ex ) { throw new OperationFailedException ( ex ) ; } } else { os . set ( osName ) ; } return os ; }
Create a ModelNode representing the operating system the instance is running on .